MessageContainer

Trait MessageContainer 

Source
pub trait MessageContainer:
    Any
    + Send
    + Sync {
    // Required methods
    fn swap(&mut self);
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

Trait for type-erased message containers.

This allows for storing heterogeneous Messages<M> containers within a single collection.

Required Methods§

Source

fn swap(&mut self)

Swaps the current and previous frame message lists.

Source

fn as_any(&self) -> &dyn Any

Provides a reference to the container as Any for downcasting.

Source

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

Provides a mutable reference to the container as Any for downcasting.

Implementors§