Struct TEXtChunk
pub struct TEXtChunk { pub keyword: String, pub text: String }
Struct representing a tEXt chunk
Fields
keyword: StringKeyword field of the tEXt chunk. Needs to be between 1-79 bytes when encoded as Latin-1.
text: StringText field of tEXt chunk. Can be at most 2GB.
Implementations
impl TEXtChunk
fn new(keyword: impl Into<String>, text: impl Into<String>) -> SelfConstructs a new TEXtChunk. Not sure whether it should take &str or String.
Trait Implementations
impl Clone for TEXtChunk
fn clone(&self) -> Self
impl Debug for TEXtChunk
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl EncodableTextChunk for TEXtChunk
fn encode<W: Write>(&self, w: &mut W) -> Result<(), EncodingError>Encodes TEXtChunk to a Writer. The keyword and text are separated by a byte of zeroes.
impl Eq for TEXtChunk
impl PartialEq for TEXtChunk
fn eq(&self, other: &Self) -> bool
impl StructuralPartialEq for TEXtChunk
Auto Trait Implementations
impl Freeze for TEXtChunk
impl RefUnwindSafe for TEXtChunk
impl Send for TEXtChunk
impl Sync for TEXtChunk
impl Unpin for TEXtChunk
impl UnsafeUnpin for TEXtChunk
impl UnwindSafe for TEXtChunk
Blanket Implementations
impl<T> Any for TEXtChunk
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TEXtChunk
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TEXtChunk
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for TEXtChunk
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for TEXtChunk
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TEXtChunk
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for TEXtChunk
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TEXtChunk
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TEXtChunk
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>