[][src]Struct async_coap::message::OwnedImmutableMessage

pub struct OwnedImmutableMessage { /* fields omitted */ }

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 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 From<VecMessageEncoder> for OwnedImmutableMessage[src]

impl PartialEq<OwnedImmutableMessage> for OwnedImmutableMessage[src]

impl Clone for OwnedImmutableMessage[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for OwnedImmutableMessage[src]

impl Display for OwnedImmutableMessage[src]

impl Debug for OwnedImmutableMessage[src]

impl<'a> Borrow<dyn MessageRead + 'a> for OwnedImmutableMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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>,