pub struct AsyncTrigger {
pub trigger: Arc<dyn Trigger>,
pub runner_tx: SyncSender<TriggerCommand>,
}Expand description
A wrapper around any other Trigger that sends it across a channel to run on a separate thread.
Fields§
§trigger: Arc<dyn Trigger>§runner_tx: SyncSender<TriggerCommand>Implementations§
Source§impl AsyncTrigger
impl AsyncTrigger
pub fn from_trigger<T>(
trigger: T,
runner_tx: SyncSender<TriggerCommand>,
) -> Selfwhere
T: Trigger + 'static,
Trait Implementations§
Source§impl Clone for AsyncTrigger
impl Clone for AsyncTrigger
Source§fn clone(&self) -> AsyncTrigger
fn clone(&self) -> AsyncTrigger
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Trigger for AsyncTrigger
impl Trigger for AsyncTrigger
fn on_frame(&self, frame: &Frame) -> Result<()>
Source§fn into_async(self, runner_tx: SyncSender<TriggerCommand>) -> AsyncTriggerwhere
Self: Sized + 'static,
fn into_async(self, runner_tx: SyncSender<TriggerCommand>) -> AsyncTriggerwhere
Self: Sized + 'static,
Convert this Trigger into a
AsyncTrigger, running on a separate thread.Auto Trait Implementations§
impl Freeze for AsyncTrigger
impl !RefUnwindSafe for AsyncTrigger
impl Send for AsyncTrigger
impl Sync for AsyncTrigger
impl Unpin for AsyncTrigger
impl !UnwindSafe for AsyncTrigger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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