pub struct Pages<'a> { /* private fields */ }
Expand description
Writer for a page tree dictionary.
This struct is created by Chunk::pages
.
Implementations§
source§impl<'a> Pages<'a>
impl<'a> Pages<'a>
sourcepub fn parent(&mut self, parent: Ref) -> &mut Self
pub fn parent(&mut self, parent: Ref) -> &mut Self
Write the /Parent
attribute. Required except in root node.
sourcepub fn kids(&mut self, kids: impl IntoIterator<Item = Ref>) -> &mut Self
pub fn kids(&mut self, kids: impl IntoIterator<Item = Ref>) -> &mut Self
Write the /Kids
attributes, listing the immediate children of this
node in the page tree. Required.
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 Pages<'a>
impl<'a> RefUnwindSafe for Pages<'a>
impl<'a> Send for Pages<'a>
impl<'a> Sync for Pages<'a>
impl<'a> Unpin for Pages<'a>
impl<'a> !UnwindSafe for Pages<'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