[][src]Struct rubble::link::Responder

pub struct Responder<M: ChannelMapper> { /* fields omitted */ }

Data channel packet processor.

This hooks up to the Real-Time part of the LE Link Layer via a packet queue. This part can run at a lower priority (eg. being driven in the apps idle loop) and receives and transmits packets using the packet queue.

Some LL Control PDUs sent as part of the Link Layer Control Protocol (LLCP) are answered by the responder directly, and all L2CAP data is forwarded to an L2CAPState<M>. Note that most LLCPDUs are handled directly by the real-time code.

Methods

impl<M: ChannelMapper> Responder<M>[src]

pub fn new(tx: Producer, rx: Consumer, l2cap: L2CAPState<M>) -> Self[src]

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

Returns true when this responder has work to do.

If this returns true, process may be called to process incoming packets and send outgoing ones.

pub fn process_one(&mut self) -> Result<(), Error>[src]

Processes a single incoming packet in the packet queue.

Returns Error::Eof if there are no incoming packets in the RX queue.

Auto Trait Implementations

impl<M> Send for Responder<M> where
    M: Send

impl<M> !Sync for Responder<M>

Blanket Implementations

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> From for T[src]

impl<T, U> TryInto 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<T, U> Into for T where
    U: From<T>, 
[src]

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

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

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