pub struct PdfString { /* private fields */ }Expand description
A PDF literal string object, e.g., (Hello World).
Implementations§
Source§impl PdfString
impl PdfString
pub fn of(value: &str) -> Self
Sourcepub fn as_bytes_decoded(&self) -> Vec<u8> ⓘ
pub fn as_bytes_decoded(&self) -> Vec<u8> ⓘ
Convert the string to raw bytes, interpreting escape sequences. Characters are treated as Latin-1 code points (0..=255), not UTF-8.
Sourcepub fn decode_text(&self) -> String
pub fn decode_text(&self) -> String
Decode the string to a text String, handling UTF-16 and PDFDocEncoding.
Trait Implementations§
Source§impl PdfObjectTrait for PdfString
impl PdfObjectTrait for PdfString
Source§fn size_in_bytes(&self) -> usize
fn size_in_bytes(&self) -> usize
Return the size in bytes when serialized.
impl StructuralPartialEq for PdfString
Auto Trait Implementations§
impl Freeze for PdfString
impl RefUnwindSafe for PdfString
impl Send for PdfString
impl Sync for PdfString
impl Unpin for PdfString
impl UnsafeUnpin for PdfString
impl UnwindSafe for PdfString
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more