Trait LayerIdentifier

Source
pub trait LayerIdentifier: Sized {
    // Required method
    fn layer_id() -> LayerId;
}
Expand description

Assigns a unique identifier to the layer.

Each protocol layer must have the same LayerId returned by this trait across Layer and LayerRef types of that protocol. So, there were a protocol layer called Example, then Example::layer_id() == ExampleRef::layer_id(), and likewise Example::layer_id() == ExampleMut::layer_id().

Required Methods§

Source

fn layer_id() -> LayerId

A unique identifier for the layer type.

This identifier is guaranteed to be the same across instances of Layer and LayerRef types of the same protocol layer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§