pub struct PdfDict(/* private fields */);Expand description
An ordered dictionary of PDF objects, keyed by name bytes.
Implementations§
Source§impl PdfDict
impl PdfDict
pub fn new() -> Self
pub fn get(&self, key: &[u8]) -> Option<&PdfObject>
pub fn insert(&mut self, key: Vec<u8>, value: PdfObject)
pub fn remove(&mut self, key: &[u8]) -> Option<PdfObject>
pub fn contains_key(&self, key: &[u8]) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&Vec<u8>, &PdfObject)>
pub fn keys(&self) -> impl Iterator<Item = &Vec<u8>>
Sourcepub fn get_i64(&self, key: &[u8]) -> Option<i64>
pub fn get_i64(&self, key: &[u8]) -> Option<i64>
Get a value as i64, returning None if not an integer.
Sourcepub fn get_name(&self, key: &[u8]) -> Option<&[u8]>
pub fn get_name(&self, key: &[u8]) -> Option<&[u8]>
Get a value as a name (byte slice), returning None if not a name.
Sourcepub fn get_ref(&self, key: &[u8]) -> Option<&IndirectRef>
pub fn get_ref(&self, key: &[u8]) -> Option<&IndirectRef>
Get a value as an indirect reference.
Sourcepub fn get_string(&self, key: &[u8]) -> Option<&[u8]>
pub fn get_string(&self, key: &[u8]) -> Option<&[u8]>
Get a value as a string (byte slice), returning None if not a string.
Trait Implementations§
impl StructuralPartialEq for PdfDict
Auto Trait Implementations§
impl Freeze for PdfDict
impl RefUnwindSafe for PdfDict
impl Send for PdfDict
impl Sync for PdfDict
impl Unpin for PdfDict
impl UnsafeUnpin for PdfDict
impl UnwindSafe for PdfDict
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more