Extern

Trait Extern 

Source
pub trait Extern {
    // Required method
    fn index<'host>(
        &'host self,
        index: Value<'host>,
    ) -> Result<Value<'host>, Error>;

    // Provided methods
    fn to_static<'host>(
        &self,
        partial_index: Option<Rc<Value<'host>>>,
    ) -> Option<StaticValue> { ... }
    fn any(&self) -> Option<&dyn Any> { ... }
    fn debug(&self, f: &mut Formatter<'_>) -> Result { ... }
}

Required Methods§

Source

fn index<'host>(&'host self, index: Value<'host>) -> Result<Value<'host>, Error>

Provided Methods§

Source

fn to_static<'host>( &self, partial_index: Option<Rc<Value<'host>>>, ) -> Option<StaticValue>

Source

fn any(&self) -> Option<&dyn Any>

Allows the Extern trait object to be downcasted back into its original type.

Implementing this method is optional. The default implementation will always return None and reject all downcasting attempts via Value::downcast_extern.

Source

fn debug(&self, f: &mut Formatter<'_>) -> Result

Implementors§