Struct DirectiveWithContext
pub struct DirectiveWithContext<'a> {
pub directive: &'a Directive,
pub parent_stack: Vec<String>,
pub depth: usize,
}Expand description
A directive paired with its parent block context.
Yielded by Config::all_directives_with_context().
Provides methods to query the parent block hierarchy without manually tracking nesting.
Fields§
§directive: &'a DirectiveThe directive itself.
parent_stack: Vec<String>Stack of parent directive names (e.g., ["http", "server"]).
depth: usizeNesting depth (0 = root level).
Implementations§
§impl<'a> DirectiveWithContext<'a>
impl<'a> DirectiveWithContext<'a>
Trait Implementations§
§impl<'a> Clone for DirectiveWithContext<'a>
impl<'a> Clone for DirectiveWithContext<'a>
§fn clone(&self) -> DirectiveWithContext<'a>
fn clone(&self) -> DirectiveWithContext<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for DirectiveWithContext<'a>
impl<'a> RefUnwindSafe for DirectiveWithContext<'a>
impl<'a> Send for DirectiveWithContext<'a>
impl<'a> Sync for DirectiveWithContext<'a>
impl<'a> Unpin for DirectiveWithContext<'a>
impl<'a> UnwindSafe for DirectiveWithContext<'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