pub struct ClassMap<'a> { /* private fields */ }
Expand description
Writer for a class map dictionary. PDF 1.4+
This struct is created by StructTreeRoot::class_map
.
Implementations§
source§impl<'a> ClassMap<'a>
impl<'a> ClassMap<'a>
sourcepub fn single(&mut self, name: Name<'_>) -> Attributes<'_>
pub fn single(&mut self, name: Name<'_>) -> Attributes<'_>
Start writing an attributes dictionary for a class name.
sourcepub fn multiple(&mut self, name: Name<'_>) -> TypedArray<'_, Attributes<'_>>
pub fn multiple(&mut self, name: Name<'_>) -> TypedArray<'_, Attributes<'_>>
Start writing an array of attribute dictionaries for a class name.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ClassMap<'a>
impl<'a> RefUnwindSafe for ClassMap<'a>
impl<'a> Send for ClassMap<'a>
impl<'a> Sync for ClassMap<'a>
impl<'a> Unpin for ClassMap<'a>
impl<'a> !UnwindSafe for ClassMap<'a>
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