pub struct ConsumeEffectBehaviorLock(pub OnceLock<ConsumeEffectBehaviorRegistry>);Expand description
Wrapper for the global consume-effect behavior registry that implements Deref.
Tuple Fields§
§0: OnceLock<ConsumeEffectBehaviorRegistry>Methods from Deref<Target = ConsumeEffectBehaviorRegistry>§
Sourcepub fn get_behavior(
&self,
effect_type: ConsumeEffectTypeRef,
) -> &dyn ConsumeEffectBehavior
pub fn get_behavior( &self, effect_type: ConsumeEffectTypeRef, ) -> &dyn ConsumeEffectBehavior
Gets the behavior for a consume-effect type.
§Panics
Panics if effect_type is not registered in the global registry.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConsumeEffectBehaviorLock
impl !RefUnwindSafe for ConsumeEffectBehaviorLock
impl !UnwindSafe for ConsumeEffectBehaviorLock
impl Send for ConsumeEffectBehaviorLock
impl Sync for ConsumeEffectBehaviorLock
impl Unpin for ConsumeEffectBehaviorLock
impl UnsafeUnpin for ConsumeEffectBehaviorLock
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>