pub struct CallbackContext<'a> { /* private fields */ }Expand description
Visitor context that binds unowned issues to one typed callback identity.
Nested callback contexts preserve the innermost identity, allowing a declared normalizer or validator to override its generated traversal hook.
Implementations§
Source§impl<'a> CallbackContext<'a>
impl<'a> CallbackContext<'a>
Sourcepub fn new(ctx: &'a mut dyn VisitorContext, callback: CallbackIdentity) -> Self
pub fn new(ctx: &'a mut dyn VisitorContext, callback: CallbackIdentity) -> Self
Bind subsequent issues to callback unless already more specifically
identified by a nested callback context.
Trait Implementations§
Source§impl VisitorContext for CallbackContext<'_>
impl VisitorContext for CallbackContext<'_>
fn add_issue(&mut self, issue: Issue)
fn add_issue_at(&mut self, seg: PathSegment, issue: Issue)
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CallbackContext<'a>
impl<'a> !Send for CallbackContext<'a>
impl<'a> !Sync for CallbackContext<'a>
impl<'a> !UnwindSafe for CallbackContext<'a>
impl<'a> Freeze for CallbackContext<'a>
impl<'a> Unpin for CallbackContext<'a>
impl<'a> UnsafeUnpin for CallbackContext<'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