Trait CapeStringConstProvider

Source
pub trait CapeStringConstProvider {
    // Required methods
    fn as_capechar_const(&self) -> *const CapeCharacter;
    fn as_capechar_const_with_length(&self) -> (*const CapeCharacter, CapeSize);
}
Expand description

Any object that implements this trait can be compared to any CapeString type object

Required Methods§

Source

fn as_capechar_const(&self) -> *const CapeCharacter

Convert to const CapeCharacter pointer (null terminated)

Note that the caller must ensure that life span of the pointer does not exceed the life span of the object and note that the pointer becomes invalid upon assiging a new string to the object

Source

fn as_capechar_const_with_length(&self) -> (*const CapeCharacter, CapeSize)

Convert to const CapeCharacter pointer (null terminated) and length (without null terminator)

Note that the caller must ensure that life span of the pointer does not exceed the life span of the object and note that the pointer becomes invalid upon assiging a new string to the object

Implementors§