pub struct Dict(/* private fields */);Expand description
a dictionary; a key given twice keeps its last value. Copies share their entries until one of them changes (inherited resources, the pages of a tree and the caches of drawing copy dictionaries freely; a hostile file must not turn that into memory without end)
Implementations§
Source§impl Dict
impl Dict
pub fn new() -> Dict
pub fn get_bytes(&self, key: &[u8]) -> Option<&Object>
pub fn contains(&self, key: &str) -> bool
pub fn insert(&mut self, key: &str, value: Object)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&Name, &Object)>
Sourcepub fn name(&self, key: &str) -> Option<&[u8]>
pub fn name(&self, key: &str) -> Option<&[u8]>
the name under a key (Type, Subtype, …), if it is one
pub fn int(&self, key: &str) -> Option<i64>
pub fn num(&self, key: &str) -> Option<f64>
Trait Implementations§
impl StructuralPartialEq for Dict
Auto Trait Implementations§
impl Forget for Dict
impl Freeze for Dict
impl Move for Dict
impl RefUnwindSafe for Dict
impl Send for Dict
impl Sync for Dict
impl Unpin for Dict
impl UnsafeUnpin for Dictwhere
*const ArcInner<BTreeMap<Name, Object>> is !null: UnsafeUnpin,
PhantomData<ArcInner<BTreeMap<Name, Object>>>: UnsafeUnpin,
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