pub struct Receiver<Proto: DecoderFactory<Mono>, Pin = NoPin, Mono: InfraMonotonic = u32, Cmd: From<Proto::Cmd> = <Proto as Protocol>::Cmd> { /* private fields */ }
Expand description
Event based Receiver
Implementations§
Source§impl<Proto, Input, Mono, Cmd> Receiver<Proto, Input, Mono, Cmd>
impl<Proto, Input, Mono, Cmd> Receiver<Proto, Input, Mono, Cmd>
pub fn with_input(freq: u32, input: Input) -> Self
pub fn event_edge( &mut self, dt: Mono::Duration, edge: bool, ) -> Result<Option<Cmd>, DecodingError>
Source§impl<Proto, Pin, const HZ: u32, Cmd> Receiver<Proto, Pin, TimerInstantU32<HZ>, Cmd>
impl<Proto, Pin, const HZ: u32, Cmd> Receiver<Proto, Pin, TimerInstantU32<HZ>, Cmd>
Sourcepub fn with_fugit(pin: Pin) -> Self
pub fn with_fugit(pin: Pin) -> Self
Create a Receiver
with pin
as input
Source§impl<Proto, Pin, const HZ: u32, Cmd> Receiver<Proto, Pin, TimerInstantU64<HZ>, Cmd>
impl<Proto, Pin, const HZ: u32, Cmd> Receiver<Proto, Pin, TimerInstantU64<HZ>, Cmd>
Sourcepub fn with_fugit64(pin: Pin) -> Self
pub fn with_fugit64(pin: Pin) -> Self
Create a Receiver
with pin
as input
Source§impl<Proto, Mono, Cmd> Receiver<Proto, NoPin, Mono, Cmd>
impl<Proto, Mono, Cmd> Receiver<Proto, NoPin, Mono, Cmd>
pub fn event( &mut self, dt: Mono::Duration, edge: bool, ) -> Result<Option<Cmd>, DecodingError>
pub fn event_instant( &mut self, t: Mono::Instant, edge: bool, ) -> Result<Option<Cmd>, DecodingError>
Auto Trait Implementations§
impl<Proto, Pin, Mono, Cmd> Freeze for Receiver<Proto, Pin, Mono, Cmd>where
<Proto as DecoderFactory<Mono>>::Decoder: Freeze,
Pin: Freeze,
<Mono as InfraMonotonic>::Instant: Freeze,
impl<Proto, Pin, Mono, Cmd> RefUnwindSafe for Receiver<Proto, Pin, Mono, Cmd>where
<Proto as DecoderFactory<Mono>>::Decoder: RefUnwindSafe,
Pin: RefUnwindSafe,
<Mono as InfraMonotonic>::Instant: RefUnwindSafe,
Cmd: RefUnwindSafe,
impl<Proto, Pin, Mono, Cmd> Send for Receiver<Proto, Pin, Mono, Cmd>where
<Proto as DecoderFactory<Mono>>::Decoder: Send,
Pin: Send,
<Mono as InfraMonotonic>::Instant: Send,
Cmd: Send,
impl<Proto, Pin, Mono, Cmd> Sync for Receiver<Proto, Pin, Mono, Cmd>where
<Proto as DecoderFactory<Mono>>::Decoder: Sync,
Pin: Sync,
<Mono as InfraMonotonic>::Instant: Sync,
Cmd: Sync,
impl<Proto, Pin, Mono, Cmd> Unpin for Receiver<Proto, Pin, Mono, Cmd>where
<Proto as DecoderFactory<Mono>>::Decoder: Unpin,
Pin: Unpin,
<Mono as InfraMonotonic>::Instant: Unpin,
Cmd: Unpin,
impl<Proto, Pin, Mono, Cmd> UnwindSafe for Receiver<Proto, Pin, Mono, Cmd>where
<Proto as DecoderFactory<Mono>>::Decoder: UnwindSafe,
Pin: UnwindSafe,
<Mono as InfraMonotonic>::Instant: UnwindSafe,
Cmd: UnwindSafe,
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