[][src]Struct apigpio::GpioChange

pub struct GpioChange {
    pub pin: Pin,
    pub level: Option<Level>,
    pub tick: Option<Tick>,
    pub sequence: Word,
}

Represents a change to a gpio pin, as requested by notify_subscribe.

Fields

pin: Pinlevel: Option<Level>

Can be None only if notify_subscribe parameter read_initially is false: then it is None before gpio has been read for the first time. In that case, the first recv on the Subscription will get None. All other recvs will get Some.

tick: Option<Tick>

None until the first change. I.e., the first recv on Subscription will get None (regardless of read_initially) and subsequent ones will get Some.

sequence: Word

Increments by 1 each time the Subscription is updated. This allows you to spot missed updates, provided that you look often enough that it doesn't wrap.

Trait Implementations

impl Clone for GpioChange[src]

impl Copy for GpioChange[src]

impl Debug for GpioChange[src]

impl Eq for GpioChange[src]

impl Hash for GpioChange[src]

impl PartialEq<GpioChange> for GpioChange[src]

impl StructuralEq for GpioChange[src]

impl StructuralPartialEq for GpioChange[src]

Auto Trait Implementations

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> Slottable for T where
    T: Copy
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.