Struct exr::meta::attribute::Text [−][src]
pub struct Text { /* fields omitted */ }Expand description
A byte array with each byte being a char. This is not UTF an must be constructed from a standard string.
Implementations
Create a Text from an str reference.
Returns None if this string contains unsupported chars.
Create a Text from an str reference.
Panics if this string contains unsupported chars.
Create a Text from a slice of bytes,
without checking any of the bytes.
Create a Text from the specified bytes object,
without checking any of the bytes.
Check whether this string is valid, adjusting long_names if required.
If long_names is not provided, text length will be entirely unchecked.
pub fn validate_bytes(
text: &TextSlice,
null_terminated: bool,
long_names: Option<&mut bool>
) -> UnitResult
pub fn validate_bytes(
text: &TextSlice,
null_terminated: bool,
long_names: Option<&mut bool>
) -> UnitResult
Check whether some bytes are valid, adjusting long_names if required.
If long_names is not provided, text length will be entirely unchecked.
The byte count this string would occupy if it were encoded as a null-terminated string.
The byte count this string would occupy if it were encoded as a size-prefixed string.
Write the length of a string and then the contents with that length.
Read the length of a string and then the contents with that length.
Read the contents with that length.
Write the string contents and a null-terminator.
Read a string until the null-terminator is found. Then skips the null-terminator.
The underlying bytes that represent this text.
Iterate over the individual chars in this text, similar to String::chars().
Does not do any heap-allocation but borrows from this instance instead.
Compare this exr::Text with a plain &str ignoring capitalization.
Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Text
impl UnwindSafe for Text
Blanket Implementations
Mutably borrows from an owned value. Read more
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().