pub struct ComptimeEventBusExpand { /* private fields */ }Implementations§
Source§impl ComptimeEventBusExpand
impl ComptimeEventBusExpand
Sourcepub fn __expand_listener_method<L: EventListener>(
&mut self,
scope: &Scope,
listener: <L as CubeType>::ExpandType,
)
pub fn __expand_listener_method<L: EventListener>( &mut self, scope: &Scope, listener: <L as CubeType>::ExpandType, )
Registers a new callback to be called when its event is launched.
§Notes
Multiple listeners for a single event type is supported. All the listeners will be called for each event in the same order they were registered.
Sourcepub fn __expand_event_method<E: CubeType + 'static>(
&mut self,
scope: &Scope,
event: <E as CubeType>::ExpandType,
)
pub fn __expand_event_method<E: CubeType + 'static>( &mut self, scope: &Scope, event: <E as CubeType>::ExpandType, )
Registers a new event to be processed by registered listeners.
Sourcepub fn __expand_new(scope: &Scope) -> Self
pub fn __expand_new(scope: &Scope) -> Self
Creates a new event bus.
Sourcepub fn __expand_listener<L: EventListener>(
scope: &Scope,
this: &mut Self,
listener: <L as CubeType>::ExpandType,
)
pub fn __expand_listener<L: EventListener>( scope: &Scope, this: &mut Self, listener: <L as CubeType>::ExpandType, )
Registers a new callback to be called when its event is launched.
§Notes
Multiple listeners for a single event type is supported. All the listeners will be called for each event in the same order they were registered.
Sourcepub fn __expand_event<E: CubeType + 'static>(
scope: &Scope,
this: &mut Self,
event: <E as CubeType>::ExpandType,
)
pub fn __expand_event<E: CubeType + 'static>( scope: &Scope, this: &mut Self, event: <E as CubeType>::ExpandType, )
Registers a new event to be processed by registered listeners.
Trait Implementations§
Source§impl AsMutExpand for ComptimeEventBusExpand
impl AsMutExpand for ComptimeEventBusExpand
fn __expand_ref_mut_method(&mut self, _: &Scope) -> &mut Self
fn __expand_as_mut_method(&mut self, scope: &Scope) -> &mut T
Source§impl AsRefExpand for ComptimeEventBusExpand
impl AsRefExpand for ComptimeEventBusExpand
fn __expand_ref_method(&self, _: &Scope) -> &Self
fn __expand_as_ref_method(&self, scope: &Scope) -> &T
Source§impl CubeDebug for ComptimeEventBusExpand
impl CubeDebug for ComptimeEventBusExpand
Source§fn set_debug_name(&self, scope: &Scope, name: &'static str)
fn set_debug_name(&self, scope: &Scope, name: &'static str)
Set the debug name of this type’s expansion. Should do nothing for types that don’t appear
at runtime
Source§impl ExpandTypeClone for ComptimeEventBusExpand
impl ExpandTypeClone for ComptimeEventBusExpand
Source§fn clone_unchecked(&self) -> Self
fn clone_unchecked(&self) -> Self
Unchecked clone that only clones the conceptual runtime value. Should only be used in cases
where each copy is used in a mutually exclusive branch (i.e. match, runtime enums). This is
intentionally separated from Rust’s
Clone semantics and should only be used for the
conceptual expand values, never real data. Using two values in the same branch is undefined
behaviour.Source§impl IntoExpand for ComptimeEventBusExpand
impl IntoExpand for ComptimeEventBusExpand
type Expand = ComptimeEventBusExpand
fn into_expand(self, _: &Scope) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ComptimeEventBusExpand
impl !Send for ComptimeEventBusExpand
impl !Sync for ComptimeEventBusExpand
impl !UnwindSafe for ComptimeEventBusExpand
impl Freeze for ComptimeEventBusExpand
impl Unpin for ComptimeEventBusExpand
impl UnsafeUnpin for ComptimeEventBusExpand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more