Struct nexus_revo_io::SymReaderFsm[][src]

pub struct SymReaderFsm<R: Read> { /* fields omitted */ }
Expand description

Finite State Machine version of SymReader.

Processes one bit with each poll call. Useful for applications that do not want to block.

Implementations

Constructs new SymReaderFsm wrapped around io::Read trait.

Example

let mut sym_reader = SymReaderFsm::new(&mut cc1101_reader);

Processes one bit of input, returning a valid message, an error, or pending. May be called repeatedly to continuously process incoming messages.

Example

loop {
    match sym_reader.poll() {
        SymReaderFsmPoll::Msg(msg) => println!("{:x?} {:?}", msg.0, msg.1),
        SymReaderFsmPoll::Err(e) => panic!("poll failure: {:?}", e),
        SymReaderFsmPoll::Pending => {}
    }
}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.