Trait lignin::callback_registry::ToRefThreadBoundFallback [−][src]
pub trait ToRefThreadBoundFallback<C>: Sealed + Sized where
C: CallbackSignature, { fn to_ref(&self) -> CallbackRef<ThreadBound, C>; }
Provides a fallback alternative implementation to CallbackRegistration::to_ref
for use in macro frameworks.
There is no limitation on the receiver’s Sync
ness, but in turn the resulting CallbackRef
is ThreadBound
.
Warning: Using this trait can unhelpfully mask the source of
ThreadBound
in a larger application.If your framework supports optional
Sync
ness annotations, consider requiring them on originally thread-bound components.
Required methods
fn to_ref(&self) -> CallbackRef<ThreadBound, C>
[src]
See CallbackRegistration::to_ref
, except that this method is unconstrained and that the resulting CallbackRef
is ThreadBound
.
Implementors
impl<R, C> ToRefThreadBoundFallback<C> for CallbackRegistration<R, C> where
C: CallbackSignature,
[src]
impl<R, C> ToRefThreadBoundFallback<C> for CallbackRegistration<R, C> where
C: CallbackSignature,
[src]