Skip to main content

Extensible

Trait Extensible 

Source
pub trait Extensible {
    // Required methods
    fn extensions(&self) -> &TypeMap;
    fn extensions_mut(&mut self) -> &mut TypeMap;
}
Expand description

Defines an interface that extensible types must implement.

Extensible types must contain a TypeMap.

Required Methods§

Source

fn extensions(&self) -> &TypeMap

Get a reference to the type’s extension storage.

Source

fn extensions_mut(&mut self) -> &mut TypeMap

Get a mutable reference to the type’s extension storage.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§