[−][src]Struct async_coap::message::StandardMessageParser
A class for parsing a stand-alone UDP CoAP message from a given buffer.
Methods
impl<'buf> StandardMessageParser<'buf>
[src]
pub const MIN_MESSAGE_BUFFER_LEN: usize
[src]
The minimum buffer size that can be passed into new()
.
pub fn new(buffer: &'buf [u8]) -> Result<StandardMessageParser<'buf>, Error>
[src]
Creates a new StandardMessageParser
instance with the given buffer
.
pub fn as_bytes(&self) -> &'buf [u8]
[src]
Returns a byte slice containing the encoded message.
Trait Implementations
impl<'buf> MessageRead for StandardMessageParser<'buf>
[src]
fn msg_code(&self) -> MsgCode
[src]
fn msg_type(&self) -> MsgType
[src]
fn msg_id(&self) -> u16
[src]
fn msg_token(&self) -> MsgToken
[src]
fn payload(&self) -> &[u8]
[src]
fn content_format(&self) -> Option<ContentFormat>
[src]
fn accept(&self) -> Option<ContentFormat>
[src]
fn block2(&self) -> Option<BlockInfo>
[src]
fn block1(&self) -> Option<BlockInfo>
[src]
ⓘImportant traits for OptionIterator<'a>fn options(&self) -> OptionIterator
[src]
ⓘImportant traits for OptionIterator<'a>
fn write_msg_to(&self, target: &mut dyn MessageWrite) -> Result<(), Error>
[src]
Writes this message to the given target
that implements MessageWrite
. Read more
fn payload_as_str(&self) -> Option<&str>
[src]
Gets the payload as a string slice.
impl<'buf> Display for StandardMessageParser<'buf>
[src]
impl<'buf> Debug for StandardMessageParser<'buf>
[src]
Auto Trait Implementations
impl<'buf> Unpin for StandardMessageParser<'buf>
impl<'buf> Sync for StandardMessageParser<'buf>
impl<'buf> Send for StandardMessageParser<'buf>
impl<'buf> UnwindSafe for StandardMessageParser<'buf>
impl<'buf> RefUnwindSafe for StandardMessageParser<'buf>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
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>,