Skip to main content

DynLayer

Trait DynLayer 

Source
pub trait DynLayer {
    // Required methods
    fn iter_all_loaded(
        &self,
    ) -> Box<dyn Iterator<Item = (Bounds, Box<dyn Debug + 'static>)> + '_>;
    fn deps(&self) -> Vec<&dyn DynLayer>;
    fn ident(&self) -> (usize, TypeId);
    fn name(&self) -> String;
}
Expand description

Can point to any layer and allows programatic access to dependencies and chunks. Implemented for Layer. You should implement this if you manually implement Dependencies.

Required Methods§

Source

fn iter_all_loaded( &self, ) -> Box<dyn Iterator<Item = (Bounds, Box<dyn Debug + 'static>)> + '_>

Iterate only over the chunks that have been generated already and not unloaded yet to make space for new ones.

Source

fn deps(&self) -> Vec<&dyn DynLayer>

Iterate over the dependency layers of this layer.

Source

fn ident(&self) -> (usize, TypeId)

A unique identifier for this layer, useful for the use as map keys.

Source

fn name(&self) -> String

A shortened version of the type name of the layer and its generic parameters.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<C: Chunk + Debug> DynLayer for Layer<C>