tvm_ffi::extra::structural_visit

Struct StructuralVisitorView

Source
pub struct StructuralVisitorView<'a, D> { /* private fields */ }
Expand description

Recursive visiting and default child descent for a dispatcher.

Pass the handler’s self to visit methods to recurse with the same state.

Implementations§

Source§

impl<D> StructuralVisitorView<'_, D>

Source

pub fn def_region_kind(&self) -> DefRegionKind

Source

pub fn with_def_region_kind<R>( &mut self, kind: DefRegionKind, callback: impl FnOnce(&mut Self) -> R, ) -> R

Run operations under a scoped definition region. An enclosing Pattern wins; the previous region is restored on all exits.

Source

pub fn visit<'input, T>( &mut self, dispatch: &mut D, value: T, ) -> Result<Option<VisitInterrupt>>
where T: Into<AnyView<'input>>,

Visit a value through the dispatcher.

Source

pub fn default_visit<'input, T>( &self, dispatch: &mut D, value: T, ) -> Result<Option<VisitInterrupt>>
where T: Into<AnyView<'input>>,

Run Base default descent, using registered hooks or reflected fields by default. Children re-enter the dispatcher; the current value does not.

Auto Trait Implementations§

§

impl<'a, D> Freeze for StructuralVisitorView<'a, D>

§

impl<'a, D> RefUnwindSafe for StructuralVisitorView<'a, D>

§

impl<'a, D> !Send for StructuralVisitorView<'a, D>

§

impl<'a, D> !Sync for StructuralVisitorView<'a, D>

§

impl<'a, D> Unpin for StructuralVisitorView<'a, D>

§

impl<'a, D> !UnwindSafe for StructuralVisitorView<'a, D>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.