[][src]Struct debouncr::Debouncer

#[repr(transparent)]pub struct Debouncer<S, M> { /* fields omitted */ }

A debouncer.

It wraps a u8 or u16, depending on the number of required consecutive logical-high states.

To create an instance, use the appropriate debounce_X function (where X is the number of required consecutive logical-high states).

Implementations

impl Debouncer<u8, Repeat2>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u8, Repeat3>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u8, Repeat4>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u8, Repeat5>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u8, Repeat6>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u8, Repeat7>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u8, Repeat8>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat9>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat10>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat11>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat12>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat13>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat14>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat15>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

impl Debouncer<u16, Repeat16>[src]

pub fn update(&mut self, pressed: bool) -> Option<Edge>[src]

Update the state.

pub fn is_high(&self) -> bool[src]

Return true if the debounced state is logical high.

pub fn is_low(&self) -> bool[src]

Return true if the debounced state is logical low.

Auto Trait Implementations

impl<S, M> Send for Debouncer<S, M> where
    M: Send,
    S: Send

impl<S, M> Sync for Debouncer<S, M> where
    M: Sync,
    S: Sync

impl<S, M> Unpin for Debouncer<S, M> where
    M: Unpin,
    S: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.