pub struct Dict(/* private fields */);Expand description
A dictionary. Keys are kept sorted, so iteration (and anything written from it) is deterministic. A repeated key keeps its last value.
Implementations§
Source§impl Dict
impl Dict
Sourcepub fn get(&self, key: &[u8]) -> Option<&Object>
pub fn get(&self, key: &[u8]) -> Option<&Object>
The value for key, if present. A null value counts as absent
(ISO 32000-2 §7.3.7).
Sourcepub fn insert(
&mut self,
key: impl Into<Name>,
value: impl Into<Object>,
) -> Option<Object>
pub fn insert( &mut self, key: impl Into<Name>, value: impl Into<Object>, ) -> Option<Object>
Sets key to value, returning the previous value.
Sourcepub fn contains_key(&self, key: &[u8]) -> bool
pub fn contains_key(&self, key: &[u8]) -> bool
Whether key is present with a non-null value.
Sourcepub fn get_dict(&self, key: &[u8]) -> Option<&Dict>
pub fn get_dict(&self, key: &[u8]) -> Option<&Dict>
The value for key if it is a dictionary (or a stream’s dictionary).
Trait Implementations§
impl StructuralPartialEq for Dict
Auto Trait Implementations§
impl Freeze for Dict
impl RefUnwindSafe for Dict
impl Send for Dict
impl Sync for Dict
impl Unpin for Dict
impl UnsafeUnpin for Dict
impl UnwindSafe for Dict
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