Struct ZTXtChunk
pub struct ZTXtChunk { pub keyword: String, /* private fields */ }
Struct representing a zTXt chunk
Fields
keyword: StringKeyword field of the tEXt chunk. Needs to be between 1-79 bytes when encoded as Latin-1.
Implementations
impl ZTXtChunk
fn new(keyword: impl Into<String>, text: impl Into<String>) -> SelfCreates a new ZTXt chunk.
fn decompress_text(&mut self) -> Result<(), DecodingError>Decompresses the inner text, mutating its own state. Can only handle decompressed text up to
DECOMPRESSION_LIMITbytes.fn decompress_text_with_limit(&mut self, limit: usize) -> Result<(), DecodingError>Decompresses the inner text, mutating its own state. Can only handle decompressed text up to
limitbytes.fn get_text(&self) -> Result<String, DecodingError>Decompresses the inner text, and returns it as a
String. If decompression uses more the 2MiB, first call decompress with limit, and then this method.fn compress_text(&mut self) -> Result<(), EncodingError>Compresses the inner text, mutating its own state.
Trait Implementations
impl Clone for ZTXtChunk
fn clone(&self) -> Self
impl Debug for ZTXtChunk
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl EncodableTextChunk for ZTXtChunk
fn encode<W: Write>(&self, w: &mut W) -> Result<(), EncodingError>
impl Eq for ZTXtChunk
impl PartialEq for ZTXtChunk
fn eq(&self, other: &Self) -> bool