pub struct PdfName { /* private fields */ }Expand description
A PDF Name object (e.g., /Type, /Page).
Names are interned — calling PdfName::of("Foo") twice returns equal values.
Hex codes in names (like #20 for space) are decoded on construction.
Implementations§
Source§impl PdfName
impl PdfName
Sourcepub fn of(name: &str) -> Self
pub fn of(name: &str) -> Self
Create a PdfName from a raw name string (without leading slash).
Hex codes like #20 are decoded.
Sourcepub fn as_bytes_decoded(&self) -> Vec<u8> ⓘ
pub fn as_bytes_decoded(&self) -> Vec<u8> ⓘ
Decode the name to raw bytes (without the leading slash).
Sourcepub fn decode_text(&self) -> String
pub fn decode_text(&self) -> String
Decode the name to a text string.
pub fn length() -> Self
pub fn flate_decode() -> Self
pub fn resources() -> Self
pub fn font() -> Self
pub fn x_object() -> Self
pub fn contents() -> Self
pub fn type() -> Self
pub fn parent() -> Self
pub fn media_box() -> Self
pub fn page() -> Self
pub fn annots() -> Self
pub fn rotate() -> Self
pub fn title() -> Self
pub fn subject() -> Self
pub fn creator() -> Self
pub fn keywords() -> Self
pub fn producer() -> Self
pub fn creation_date() -> Self
pub fn mod_date() -> Self
Trait Implementations§
Source§impl PdfObjectTrait for PdfName
impl PdfObjectTrait for PdfName
Source§fn size_in_bytes(&self) -> usize
fn size_in_bytes(&self) -> usize
Return the size in bytes when serialized.
impl Eq for PdfName
impl StructuralPartialEq for PdfName
Auto Trait Implementations§
impl Freeze for PdfName
impl RefUnwindSafe for PdfName
impl Send for PdfName
impl Sync for PdfName
impl Unpin for PdfName
impl UnsafeUnpin for PdfName
impl UnwindSafe for PdfName
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