[−][src]Struct async_coap::message::OwnedImmutableMessage
A class representing an immutable heap-allocated UDP CoAP message.
Methods
impl OwnedImmutableMessage
[src]
pub const MIN_MESSAGE_BUFFER_LEN: usize
[src]
The minimum size of a buffer that can be passed into new()
.
pub fn new(buffer: Vec<u8>) -> Result<OwnedImmutableMessage, Error>
[src]
Creates a new OwnedImmutableMessage
instance with the given buffer
.
pub fn as_bytes(&self) -> &[u8]
[src]
Returns a byte slice containing the encoded message.
Trait Implementations
impl MessageRead for OwnedImmutableMessage
[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 Clone for OwnedImmutableMessage
[src]
fn clone(&self) -> OwnedImmutableMessage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<VecMessageEncoder> for OwnedImmutableMessage
[src]
fn from(x: VecMessageEncoder) -> Self
[src]
impl Eq for OwnedImmutableMessage
[src]
impl PartialEq<OwnedImmutableMessage> for OwnedImmutableMessage
[src]
fn eq(&self, other: &OwnedImmutableMessage) -> bool
[src]
fn ne(&self, other: &OwnedImmutableMessage) -> bool
[src]
impl Display for OwnedImmutableMessage
[src]
impl Debug for OwnedImmutableMessage
[src]
impl<'a> Borrow<dyn MessageRead + 'a> for OwnedImmutableMessage
[src]
fn borrow(&self) -> &(dyn MessageRead + 'a)
[src]
Auto Trait Implementations
impl Unpin for OwnedImmutableMessage
impl Sync for OwnedImmutableMessage
impl Send for OwnedImmutableMessage
impl UnwindSafe for OwnedImmutableMessage
impl RefUnwindSafe for OwnedImmutableMessage
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,