Struct simrs::Components
source · [−]pub struct Components { /* private fields */ }
Expand description
Container holding type-erased components.
Implementations
sourceimpl Components
impl Components
sourcepub fn process_event_entry(
&self,
entry: EventEntry,
scheduler: &mut Scheduler,
state: &mut State
)
pub fn process_event_entry(
&self,
entry: EventEntry,
scheduler: &mut Scheduler,
state: &mut State
)
Process the event on the component given by the event entry.
sourcepub fn add_component<E: Debug + 'static, C: Component<Event = E> + 'static>(
&mut self,
component: C
) -> ComponentId<E>
pub fn add_component<E: Debug + 'static, C: Component<Event = E> + 'static>(
&mut self,
component: C
) -> ComponentId<E>
Registers a new component and returns its ID.
Trait Implementations
sourceimpl Default for Components
impl Default for Components
sourcefn default() -> Components
fn default() -> Components
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Components
impl !Send for Components
impl !Sync for Components
impl Unpin for Components
impl !UnwindSafe for Components
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more