[][src]Enum spectrusty_formats::tap::pulse::PulseIterState

pub enum PulseIterState {
    Lead {
        countdown: u16,
    },
    Sync1,
    Sync2,
    Data {
        current: u8,
        pulse: u8,
    },
    Done,
    Error(Error),
}

The current state of the ReadEncPulseIter.

Variants

Lead

Emitting lead pulses.

Fields of Lead

countdown: u16

How many pulses left to the end of this lead.

Sync1

Emitting the 1st sync pulse.

Sync2

Emitting the 2nd sync pulse.

Data

Emitting data pulses.

Fields of Data

current: u8

A current byte. The highest bit determines the last (pulse is odd) or next (pulse is even) pulse being emitted.

pulse: u8

A pulse counter for the current byte. There are two pulses per each bit (16 pulses per byte).

Done

Emitting is done.

Error(Error)

There was an error from an underlying reader.

Implementations

impl PulseIterState[src]

pub fn err(&self) -> Option<&Error>[src]

Returns an error from the underlying reader if there was one.

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

Returns true if there are no more pulses to emit or there was an error while reading bytes.

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

Returns true if emitting lead pulses.

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

Returns true if emitting data pulses.

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

Returns true if emitting sync1 pulse.

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

Returns true if emitting sync2 pulse.

Trait Implementations

impl Debug for PulseIterState[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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<S, T> IntoSample<S> for T where
    S: FromSample<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,