pub struct Dictionary(/* private fields */);
Expand description
Dictionary object.
Implementations§
Source§impl Dictionary
impl Dictionary
pub fn new() -> Dictionary
pub fn has(&self, key: &[u8]) -> bool
pub fn get(&self, key: &[u8]) -> Result<&Object, Error>
Sourcepub fn get_deref<'a>(
&'a self,
key: &[u8],
doc: &'a Document,
) -> Result<&'a Object, Error>
pub fn get_deref<'a>( &'a self, key: &[u8], doc: &'a Document, ) -> Result<&'a Object, Error>
Extract object from dictionary, dereferencing the object if it is a reference.
pub fn get_mut(&mut self, key: &[u8]) -> Result<&mut Object, Error>
pub fn set<K, V>(&mut self, key: K, value: V)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn remove(&mut self, key: &[u8]) -> Option<Object>
pub fn has_type(&self, type_name: &[u8]) -> bool
pub fn get_type(&self) -> Result<&[u8], Error>
pub fn iter(&self) -> Iter<'_, Vec<u8>, Object>
pub fn iter_mut(&mut self) -> IterMut<'_, Vec<u8>, Object>
pub fn get_font_encoding(&self, doc: &Document) -> Result<Encoding<'_>, Error>
pub fn extend(&mut self, other: &Dictionary)
Trait Implementations§
Source§impl Clone for Dictionary
impl Clone for Dictionary
Source§fn clone(&self) -> Dictionary
fn clone(&self) -> Dictionary
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Dictionary
impl Debug for Dictionary
Source§impl Default for Dictionary
impl Default for Dictionary
Source§fn default() -> Dictionary
fn default() -> Dictionary
Returns the “default value” for a type. Read more
Source§impl From<Dictionary> for Object
impl From<Dictionary> for Object
Source§fn from(dict: Dictionary) -> Object
fn from(dict: Dictionary) -> Object
Converts to this type from the input type.
Source§impl<K> FromIterator<(K, Object)> for Dictionary
impl<K> FromIterator<(K, Object)> for Dictionary
Source§fn from_iter<I>(iter: I) -> Dictionarywhere
I: IntoIterator<Item = (K, Object)>,
fn from_iter<I>(iter: I) -> Dictionarywhere
I: IntoIterator<Item = (K, Object)>,
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a Dictionary
impl<'a> IntoIterator for &'a Dictionary
Source§impl<'a> IntoIterator for &'a mut Dictionary
impl<'a> IntoIterator for &'a mut Dictionary
Source§fn into_iter(self) -> <&'a mut Dictionary as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut Dictionary as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl IntoIterator for Dictionary
impl IntoIterator for Dictionary
Source§impl PartialEq for Dictionary
impl PartialEq for Dictionary
impl StructuralPartialEq for Dictionary
Auto Trait Implementations§
impl Freeze for Dictionary
impl RefUnwindSafe for Dictionary
impl Send for Dictionary
impl Sync for Dictionary
impl Unpin for Dictionary
impl UnwindSafe for Dictionary
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