[−][src]Struct async_coap::BlockReconstructor
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]
F: Write,
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,
F: Send,
impl<F> Unpin for BlockReconstructor<F> where
F: Unpin,
F: Unpin,
impl<F> Sync for BlockReconstructor<F> where
F: Sync,
F: Sync,
impl<F> UnwindSafe for BlockReconstructor<F> where
F: UnwindSafe,
F: UnwindSafe,
impl<F> RefUnwindSafe for BlockReconstructor<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,