Skip to main content

ResolveDirectivesVisitor

Struct ResolveDirectivesVisitor 

Source
pub struct ResolveDirectivesVisitor<'a> { /* private fields */ }
Expand description

A visitor that resolves all Resolvable::Unresolved entries in the korok tree by delegating to the DirectiveResolver.

This visitor runs automatically as the first step in resolve_plugins(), before any lifecycle hooks fire.

Implementations§

Source§

impl<'a> ResolveDirectivesVisitor<'a>

Source

pub fn new(resolver: &'a dyn DirectiveResolver) -> Self

Trait Implementations§

Source§

impl KorokVisitor for ResolveDirectivesVisitor<'_>

Source§

fn visit_root(&mut self, korok: &mut RootKorok<'_>) -> CodamaResult<()>

Source§

fn visit_crate(&mut self, korok: &mut CrateKorok<'_>) -> CodamaResult<()>

Source§

fn visit_file_module( &mut self, korok: &mut FileModuleKorok<'_>, ) -> CodamaResult<()>

Source§

fn visit_module(&mut self, korok: &mut ModuleKorok<'_>) -> CodamaResult<()>

Source§

fn visit_struct(&mut self, korok: &mut StructKorok<'_>) -> CodamaResult<()>

Source§

fn visit_enum(&mut self, korok: &mut EnumKorok<'_>) -> CodamaResult<()>

Source§

fn visit_enum_variant( &mut self, korok: &mut EnumVariantKorok<'_>, ) -> CodamaResult<()>

Source§

fn visit_field(&mut self, korok: &mut FieldKorok<'_>) -> CodamaResult<()>

Source§

fn visit_unsupported_item( &mut self, korok: &mut UnsupportedItemKorok<'_>, ) -> CodamaResult<()>

Source§

fn visit_impl(&mut self, korok: &mut ImplKorok<'_>) -> CodamaResult<()>

Source§

fn visit_const(&mut self, korok: &mut ConstKorok<'_>) -> CodamaResult<()>

Source§

fn visit_unsupported_impl_item( &mut self, korok: &mut UnsupportedImplItemKorok<'_>, ) -> CodamaResult<()>

Source§

fn visit_children( &mut self, korok: &mut dyn KorokVisitable, ) -> Result<(), CodamaError>
where Self: Sized,

Source§

fn visit_item(&mut self, korok: &mut ItemKorok<'_>) -> Result<(), CodamaError>

Source§

fn visit_impl_item( &mut self, korok: &mut ImplItemKorok<'_>, ) -> Result<(), CodamaError>

Auto Trait Implementations§

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<'a, T, U> TryFromFilter<'a, U> for T
where T: 'a, &'a T: TryFrom<U>,

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.