Struct Builder

Source
pub struct Builder<Proto = (), Pin = NoPin, Mono: InfraMonotonic = u32, Cmd = ()> { /* private fields */ }
Expand description

Receiver Builder

Implementations§

Source§

impl<Proto, Input, Mono, Cmd> Builder<Proto, Input, Mono, Cmd>
where Mono: InfraMonotonic,

Source

pub fn monotonic<NewMono: InfraMonotonic>( self, ) -> Builder<Proto, Input, NewMono, Cmd>

Set the monotonic clock type to use

Source

pub fn protocol<NewProto: Protocol>( self, ) -> Builder<NewProto, Input, Mono, NewProto::Cmd>

Source

pub fn nec(self) -> Builder<Nec, Input, Mono, NecCommand>

Source

pub fn nec16(self) -> Builder<Nec16, Input, Mono, <Nec16 as Protocol>::Cmd>

Source

pub fn nec_samsung( self, ) -> Builder<SamsungNec, Input, Mono, <SamsungNec as Protocol>::Cmd>

Source

pub fn nec_apple( self, ) -> Builder<AppleNec, Input, Mono, <AppleNec as Protocol>::Cmd>

Source

pub fn rc5(self) -> Builder<Rc5, Input, Mono, <Rc5 as Protocol>::Cmd>

Source

pub fn rc6(self) -> Builder<Rc6, Input, Mono, <Rc6 as Protocol>::Cmd>

Source

pub fn samsung_bluray(self) -> Builder<Sbp, Input, Mono, <Sbp as Protocol>::Cmd>

Source

pub fn denon(self) -> Builder<Denon, Input, Mono, <Denon as Protocol>::Cmd>

Source

pub fn remotecontrol<Remote>( self, _: Remote, ) -> Builder<Proto, Input, Mono, Button<Remote>>
where Remote: RemoteControlModel,

Use Remote control

Source

pub fn pin<NewPin: InputPin>( self, pin: NewPin, ) -> Builder<Proto, NewPin, Mono, Cmd>

The Receiver use pin as input

Source

pub fn frequency(self, hz: u32) -> Self

Source

pub fn build(self) -> Receiver<Proto, Input, Mono, Cmd>
where Proto: DecoderFactory<Mono>, Cmd: From<<Proto as Protocol>::Cmd>,

Create the Receiver

Source

pub fn build_polled(self) -> PeriodicPoll<Proto, Input, Cmd>
where Proto: DecoderFactory<u32>, Cmd: From<<Proto as Protocol>::Cmd>,

Trait Implementations§

Source§

impl Default for Builder<(), NoPin, u32, ()>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<Proto, Pin, Mono, Cmd> Freeze for Builder<Proto, Pin, Mono, Cmd>
where Pin: Freeze,

§

impl<Proto, Pin, Mono, Cmd> RefUnwindSafe for Builder<Proto, Pin, Mono, Cmd>
where Pin: RefUnwindSafe, Proto: RefUnwindSafe, Cmd: RefUnwindSafe, Mono: RefUnwindSafe,

§

impl<Proto, Pin, Mono, Cmd> Send for Builder<Proto, Pin, Mono, Cmd>
where Pin: Send, Proto: Send, Cmd: Send, Mono: Send,

§

impl<Proto, Pin, Mono, Cmd> Sync for Builder<Proto, Pin, Mono, Cmd>
where Pin: Sync, Proto: Sync, Cmd: Sync, Mono: Sync,

§

impl<Proto, Pin, Mono, Cmd> Unpin for Builder<Proto, Pin, Mono, Cmd>
where Pin: Unpin, Proto: Unpin, Cmd: Unpin, Mono: Unpin,

§

impl<Proto, Pin, Mono, Cmd> UnwindSafe for Builder<Proto, Pin, Mono, Cmd>
where Pin: UnwindSafe, Proto: UnwindSafe, Cmd: UnwindSafe, Mono: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.