pub struct ContextChain { /* private fields */ }Expand description
A flat sequence of context entries for serialization or display.
Implementations§
Source§impl ContextChain
impl ContextChain
Sourcepub fn push(&mut self, entry: ContextEntry)
pub fn push(&mut self, entry: ContextEntry)
Push an entry.
Sourcepub fn pop(&mut self) -> Option<ContextEntry>
pub fn pop(&mut self) -> Option<ContextEntry>
Pop the last entry.
Sourcepub fn entries(&self) -> &[ContextEntry]
pub fn entries(&self) -> &[ContextEntry]
Get all entries.
Sourcepub fn num_implicit(&self) -> usize
pub fn num_implicit(&self) -> usize
Count implicit entries.
Sourcepub fn find(&self, name: &Name) -> Option<&ContextEntry>
pub fn find(&self, name: &Name) -> Option<&ContextEntry>
Find an entry by name (searches from innermost).
Sourcepub fn from_context(ctx: &Context) -> Self
pub fn from_context(ctx: &Context) -> Self
Build from a Context.
Trait Implementations§
Source§impl Clone for ContextChain
impl Clone for ContextChain
Source§impl Debug for ContextChain
impl Debug for ContextChain
Auto Trait Implementations§
impl !Send for ContextChain
impl !Sync for ContextChain
impl Forget for ContextChain
impl Freeze for ContextChain
impl Move for ContextChain
impl RefUnwindSafe for ContextChain
impl Unpin for ContextChain
impl UnsafeUnpin for ContextChain
impl UnwindSafe for ContextChain
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