Trait iri_string::template::context::Visitor

source ·
pub trait Visitor: Sized + Sealed {
    type Result;
    type ListVisitor: ListVisitor<Result = Self::Result>;
    type AssocVisitor: AssocVisitor<Result = Self::Result>;

    // Required methods
    fn var_name(&self) -> VarName<'_>;
    fn visit_undefined(self) -> Self::Result;
    fn visit_string<T: Display>(self, v: T) -> Self::Result;
    fn visit_list(self) -> Self::ListVisitor;
    fn visit_assoc(self) -> Self::AssocVisitor;
}
Expand description

Variable visitor.

See the module documentation for usage.

Required Associated Types§

source

type Result

Result of the visit.

source

type ListVisitor: ListVisitor<Result = Self::Result>

List visitor.

source

type AssocVisitor: AssocVisitor<Result = Self::Result>

Associative array visitor.

Required Methods§

source

fn var_name(&self) -> VarName<'_>

Returns the name of the variable to visit.

source

fn visit_undefined(self) -> Self::Result

Visits an undefined variable, i.e. indicates that the requested variable is unavailable.

source

fn visit_string<T: Display>(self, v: T) -> Self::Result

Visits a string variable.

source

fn visit_list(self) -> Self::ListVisitor

Visits a list variable.

source

fn visit_assoc(self) -> Self::AssocVisitor

Visits an associative array variable.

Object Safety§

This trait is not object safe.

Implementors§