[][src]Struct sp_externalities::Extensions

pub struct Extensions { /* fields omitted */ }

Stores extensions that should be made available through the externalities.

Implementations

impl Extensions[src]

pub fn new() -> Self[src]

Create new instance of Self.

pub fn register<E: Extension>(&mut self, ext: E)[src]

Register the given extension.

pub fn register_with_type_id(
    &mut self,
    type_id: TypeId,
    extension: Box<dyn Extension>
) -> Result<(), Error>
[src]

Register extension ext.

pub fn get_mut(&mut self, ext_type_id: TypeId) -> Option<&mut dyn Any>[src]

Return a mutable reference to the requested extension.

pub fn deregister(&mut self, type_id: TypeId) -> Option<Box<dyn Extension>>[src]

Deregister extension of type E.

Trait Implementations

impl Debug for Extensions[src]

impl Default for Extensions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.