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 + 'static)> { ... }
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error> { ... }
}Required Methods§
Provided Methods§
fn to_static<'host>( &self, partial_index: Option<Rc<Value<'host>>>, ) -> Option<StaticValue>
Sourcefn any(&self) -> Option<&(dyn Any + 'static)>
fn any(&self) -> Option<&(dyn Any + 'static)>
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.