[][src]Struct async_coap::BlockReconstructor

pub struct BlockReconstructor<F> { /* fields omitted */ }

Tool for reconstructing block-wise messages.

This mechanism was designed so that it can be used successfully with block1 (request payload) and block2 (response payload) messages.

Methods

impl<F> BlockReconstructor<F> where
    F: Write
[src]

pub fn new(write: F, next_block: BlockInfo) -> BlockReconstructor<F>[src]

Creates a new instance of BlockReconstructor.

pub fn next_block(&self) -> BlockInfo[src]

The next block this object wants.

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

Returns true if we have received all of our blocks and have no additional processing to perform.

pub fn into_inner(self) -> F[src]

Consumes this object and returns the underlying std::io::Write instance.

pub fn feed(&mut self, block: BlockInfo, payload: &[u8]) -> Result<bool, ()>[src]

Feeds a block (with an associated payload) to the reconstructor.

Trait Implementations

impl<F: Default + Write> Default for BlockReconstructor<F>[src]

impl<F: Debug> Debug for BlockReconstructor<F>[src]

Auto Trait Implementations

impl<F> Send for BlockReconstructor<F> where
    F: Send

impl<F> Unpin for BlockReconstructor<F> where
    F: Unpin

impl<F> Sync for BlockReconstructor<F> where
    F: Sync

impl<F> UnwindSafe for BlockReconstructor<F> where
    F: UnwindSafe

impl<F> RefUnwindSafe for BlockReconstructor<F> where
    F: RefUnwindSafe

Blanket Implementations

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.

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

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

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

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