pub struct Dict { /* private fields */ }Expand description
A PDF dictionary << /Key Value >>. Iteration order is insertion
order so generated PDFs are byte-stable across runs.
Implementations§
Source§impl Dict
impl Dict
pub fn new() -> Self
Sourcepub fn set(&mut self, key: &str, value: Object) -> &mut Self
pub fn set(&mut self, key: &str, value: Object) -> &mut Self
Insert (or overwrite) key. Returns &mut self for chaining.
Sourcepub fn with(self, key: &str, value: Object) -> Self
pub fn with(self, key: &str, value: Object) -> Self
Insert (or overwrite) and return self by value (builder style).
pub fn entries(&self) -> &[(String, Object)]
pub fn is_empty(&self) -> bool
Trait Implementations§
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