View

Trait View 

Source
pub trait View<'a, S>: Sized {
    // Required method
    fn view(module: &'a Module<'a>, src: S) -> Option<Self>;
}
Expand description

Trait for views into a Module.

Required Methods§

Source

fn view(module: &'a Module<'a>, src: S) -> Option<Self>

Attempt to interpret a subpart of a module as this type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, S, T> View<'a, &'a [S]> for Box<[T]>
where T: View<'a, &'a S>,

Source§

fn view(module: &'a Module<'a>, sources: &'a [S]) -> Option<Self>

Source§

impl<'a, S, T> View<'a, &'a [S]> for Arc<[T]>
where T: View<'a, &'a S>,

Source§

fn view(module: &'a Module<'a>, sources: &'a [S]) -> Option<Self>

Source§

impl<'a, S, T> View<'a, &'a [S]> for Vec<T>
where T: View<'a, &'a S>,

Source§

fn view(module: &'a Module<'a>, sources: &'a [S]) -> Option<Self>

Source§

impl<'a, S, T> View<'a, Option<S>> for Option<T>
where T: View<'a, S>,

Source§

fn view(module: &'a Module<'a>, src: Option<S>) -> Option<Self>

Implementors§

Source§

impl<'a> View<'a, SeqPart> for SeqPart

Source§

impl<'a> View<'a, LinkIndex> for LinkName

Source§

impl<'a> View<'a, NodeId> for Node

Source§

impl<'a> View<'a, NodeId> for SymbolName

Source§

impl<'a> View<'a, Param<'a>> for Param

Source§

impl<'a> View<'a, RegionId> for Region

Source§

impl<'a> View<'a, Symbol<'a>> for Symbol

Source§

impl<'a> View<'a, TermId> for Term

Source§

impl<'a> View<'a, VarId> for VarName

Source§

impl<'a, S, T> View<'a, &S> for T
where T: View<'a, S>, S: Copy,