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§fn clone(&self) -> ContextChain
fn clone(&self) -> ContextChain
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextChain
impl Debug for ContextChain
Source§impl Default for ContextChain
impl Default for ContextChain
Source§fn default() -> ContextChain
fn default() -> ContextChain
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContextChain
impl RefUnwindSafe for ContextChain
impl Send for ContextChain
impl Sync 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