Skip to main content

ContextXamlAstVisitor

Struct ContextXamlAstVisitor 

Source
pub struct ContextXamlAstVisitor<'a, C: IContextXamlAstVisitorCore> { /* private fields */ }
Expand description

A visitor bound to a transformation context: it maintains the parent stack and converts transformer failures into diagnostics, replacing the failed node with a “skip” node when the diagnostics handler does not treat the error as fatal.

Implementations§

Source§

impl<'a, C: IContextXamlAstVisitorCore> ContextXamlAstVisitor<'a, C>

Source

pub fn new(context: &'a AstTransformationContext, core: C) -> Self

Trait Implementations§

Source§

impl<C: IContextXamlAstVisitorCore> IXamlAstVisitor for ContextXamlAstVisitor<'_, C>

Source§

fn visit( &mut self, node: Rc<dyn IXamlAstNode>, ) -> XamlResult<Rc<dyn IXamlAstNode>>

Source§

fn push(&mut self, node: Rc<dyn IXamlAstNode>)

Source§

fn pop(&mut self)

Auto Trait Implementations§

§

impl<'a, C> !RefUnwindSafe for ContextXamlAstVisitor<'a, C>

§

impl<'a, C> !Send for ContextXamlAstVisitor<'a, C>

§

impl<'a, C> !Sync for ContextXamlAstVisitor<'a, C>

§

impl<'a, C> !UnwindSafe for ContextXamlAstVisitor<'a, C>

§

impl<'a, C> Freeze for ContextXamlAstVisitor<'a, C>
where C: Freeze,

§

impl<'a, C> Unpin for ContextXamlAstVisitor<'a, C>
where C: Unpin,

§

impl<'a, C> UnsafeUnpin for ContextXamlAstVisitor<'a, C>
where C: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.