pub struct StandardMessageParser<'buf> { /* private fields */ }
Expand description
A class for parsing a stand-alone UDP CoAP message from a given buffer.
Implementations§
Source§impl<'buf> StandardMessageParser<'buf>
impl<'buf> StandardMessageParser<'buf>
Sourcepub const MIN_MESSAGE_BUFFER_LEN: usize = 4usize
pub const MIN_MESSAGE_BUFFER_LEN: usize = 4usize
The minimum buffer size that can be passed into new()
.
Trait Implementations§
Source§impl<'buf> Debug for StandardMessageParser<'buf>
impl<'buf> Debug for StandardMessageParser<'buf>
Source§impl<'buf> Display for StandardMessageParser<'buf>
impl<'buf> Display for StandardMessageParser<'buf>
Source§impl<'buf> MessageRead for StandardMessageParser<'buf>
impl<'buf> MessageRead for StandardMessageParser<'buf>
Source§fn content_format(&self) -> Option<ContentFormat>
fn content_format(&self) -> Option<ContentFormat>
Indicates the content format of the payload, if specified.
Source§fn accept(&self) -> Option<ContentFormat>
fn accept(&self) -> Option<ContentFormat>
Indicates the content format that the sender of the message will accept
for the payload of the response, if specified.
Source§fn block2(&self) -> Option<BlockInfo>
fn block2(&self) -> Option<BlockInfo>
Returns the value of the
block2
option for this message, if any.Source§fn block1(&self) -> Option<BlockInfo>
fn block1(&self) -> Option<BlockInfo>
Returns the value of the
block1
option for this message, if any.Source§fn options(&self) -> OptionIterator<'_> ⓘ
fn options(&self) -> OptionIterator<'_> ⓘ
Gets an iterator for processing the options of the message.
Source§fn write_msg_to(&self, target: &mut dyn MessageWrite) -> Result<(), Error>
fn write_msg_to(&self, target: &mut dyn MessageWrite) -> Result<(), Error>
Source§fn payload_as_str(&self) -> Option<&str>
fn payload_as_str(&self) -> Option<&str>
Gets the payload as a string slice.
Auto Trait Implementations§
impl<'buf> Freeze for StandardMessageParser<'buf>
impl<'buf> RefUnwindSafe for StandardMessageParser<'buf>
impl<'buf> Send for StandardMessageParser<'buf>
impl<'buf> Sync for StandardMessageParser<'buf>
impl<'buf> Unpin for StandardMessageParser<'buf>
impl<'buf> UnwindSafe for StandardMessageParser<'buf>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more