pub trait Extension: Send + Any {
    // Required method
    fn as_mut_any(&mut self) -> &mut dyn Any;
}
Expand description

Marker trait for types that should be registered as Externalities extension.

As extensions are stored as Box<Any>, this trait should give more confidence that the correct type is registered and requested.

Required Methods§

source

fn as_mut_any(&mut self) -> &mut dyn Any

Return the extension as &mut dyn Any.

This is a trick to make the trait type castable into an Any.

Trait Implementations§

source§

impl Extension for Box<dyn Extension>

source§

fn as_mut_any(&mut self) -> &mut dyn Any

Return the extension as &mut dyn Any. Read more

Implementations on Foreign Types§

source§

impl Extension for Box<dyn Extension>

source§

fn as_mut_any(&mut self) -> &mut dyn Any

Implementors§