Struct TEXtChunk

pub struct TEXtChunk { pub keyword: String, pub text: String }

Struct representing a tEXt chunk

Fields

keyword: String

Keyword field of the tEXt chunk. Needs to be between 1-79 bytes when encoded as Latin-1.

text: String

Text field of tEXt chunk. Can be at most 2GB.

Implementations

impl TEXtChunk

fn new(keyword: impl Into<String>, text: impl Into<String>) -> Self

Constructs 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,

impl<T> Borrow<T> for TEXtChunk where T: ?Sized,

impl<T> BorrowMut<T> for TEXtChunk where T: ?Sized,

impl<T> CloneToUninit for TEXtChunk where T: Clone,

impl<T> From<T> for TEXtChunk

impl<T> ToOwned for TEXtChunk where T: Clone,

impl<T, U> Into<U> for TEXtChunk where U: From<T>,

impl<T, U> TryFrom<U> for TEXtChunk where U: Into<T>,

impl<T, U> TryInto<U> for TEXtChunk where U: TryFrom<T>,