pub struct OwnedImmutableMessage { /* private fields */ }
Expand description
A class representing an immutable heap-allocated UDP CoAP message.
Implementations§
Source§impl OwnedImmutableMessage
impl OwnedImmutableMessage
Sourcepub const MIN_MESSAGE_BUFFER_LEN: usize = 4usize
pub const MIN_MESSAGE_BUFFER_LEN: usize = 4usize
The minimum size of a buffer that can be passed into new()
.
Trait Implementations§
Source§impl<'a> Borrow<dyn MessageRead + 'a> for OwnedImmutableMessage
impl<'a> Borrow<dyn MessageRead + 'a> for OwnedImmutableMessage
Source§fn borrow(&self) -> &(dyn MessageRead + 'a)
fn borrow(&self) -> &(dyn MessageRead + 'a)
Immutably borrows from an owned value. Read more
Source§impl Clone for OwnedImmutableMessage
impl Clone for OwnedImmutableMessage
Source§fn clone(&self) -> OwnedImmutableMessage
fn clone(&self) -> OwnedImmutableMessage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OwnedImmutableMessage
impl Debug for OwnedImmutableMessage
Source§impl Display for OwnedImmutableMessage
impl Display for OwnedImmutableMessage
Source§impl From<VecMessageEncoder> for OwnedImmutableMessage
impl From<VecMessageEncoder> for OwnedImmutableMessage
Source§fn from(x: VecMessageEncoder) -> Self
fn from(x: VecMessageEncoder) -> Self
Converts to this type from the input type.
Source§impl MessageRead for OwnedImmutableMessage
impl MessageRead for OwnedImmutableMessage
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.
Source§impl PartialEq for OwnedImmutableMessage
impl PartialEq for OwnedImmutableMessage
Source§impl<SD, IC> SendDesc<IC, OwnedImmutableMessage> for EmitAnyResponse<SD>
impl<SD, IC> SendDesc<IC, OwnedImmutableMessage> for EmitAnyResponse<SD>
Source§fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
Calculates the duration of the delay to wait before sending the next retransmission. Read more
Source§fn delay_to_restart(&self) -> Option<Duration>
fn delay_to_restart(&self) -> Option<Duration>
The delay to wait between when we have received a successful response and when
we should send out another request. Read more
Source§fn max_rtt(&self) -> Duration
fn max_rtt(&self) -> Duration
The maximum time to wait for an asynchronous response after having received an ACK.
Source§fn transmit_wait_duration(&self) -> Duration
fn transmit_wait_duration(&self) -> Duration
the maximum time from the first transmission of a Confirmable message to the time when
the sender gives up on receiving an acknowledgement or reset.
Source§fn write_options(
&self,
msg: &mut dyn OptionInsert,
socket_addr: &IC::SocketAddr,
start: Bound<OptionNumber>,
end: Bound<OptionNumber>,
) -> Result<(), Error>
fn write_options( &self, msg: &mut dyn OptionInsert, socket_addr: &IC::SocketAddr, start: Bound<OptionNumber>, end: Bound<OptionNumber>, ) -> Result<(), Error>
Defines which options are going to be included in the outbound message. Read more
Source§fn write_payload(
&self,
msg: &mut dyn MessageWrite,
socket_addr: &IC::SocketAddr,
) -> Result<(), Error>
fn write_payload( &self, msg: &mut dyn MessageWrite, socket_addr: &IC::SocketAddr, ) -> Result<(), Error>
Generates the outbound message by making calls into
msg
.Source§fn supports_option(&self, option: OptionNumber) -> bool
fn supports_option(&self, option: OptionNumber) -> bool
Experimental: Used for determining if the given option seen in the reply message
is supported or not. Read more
Source§fn handler(
&mut self,
context: Result<&IC, Error>,
) -> Result<ResponseStatus<OwnedImmutableMessage>, Error>
fn handler( &mut self, context: Result<&IC, Error>, ) -> Result<ResponseStatus<OwnedImmutableMessage>, Error>
Handles the response to the outbound message.
Source§fn trans_params(&self) -> Option<TP>
fn trans_params(&self) -> Option<TP>
Experimental: Gets custom transmission parameters.
Source§impl<SD, IC> SendDesc<IC, OwnedImmutableMessage> for EmitSuccessfulResponse<SD>
impl<SD, IC> SendDesc<IC, OwnedImmutableMessage> for EmitSuccessfulResponse<SD>
Source§fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
Calculates the duration of the delay to wait before sending the next retransmission. Read more
Source§fn delay_to_restart(&self) -> Option<Duration>
fn delay_to_restart(&self) -> Option<Duration>
The delay to wait between when we have received a successful response and when
we should send out another request. Read more
Source§fn max_rtt(&self) -> Duration
fn max_rtt(&self) -> Duration
The maximum time to wait for an asynchronous response after having received an ACK.
Source§fn transmit_wait_duration(&self) -> Duration
fn transmit_wait_duration(&self) -> Duration
the maximum time from the first transmission of a Confirmable message to the time when
the sender gives up on receiving an acknowledgement or reset.
Source§fn write_options(
&self,
msg: &mut dyn OptionInsert,
socket_addr: &IC::SocketAddr,
start: Bound<OptionNumber>,
end: Bound<OptionNumber>,
) -> Result<(), Error>
fn write_options( &self, msg: &mut dyn OptionInsert, socket_addr: &IC::SocketAddr, start: Bound<OptionNumber>, end: Bound<OptionNumber>, ) -> Result<(), Error>
Defines which options are going to be included in the outbound message. Read more
Source§fn write_payload(
&self,
msg: &mut dyn MessageWrite,
socket_addr: &IC::SocketAddr,
) -> Result<(), Error>
fn write_payload( &self, msg: &mut dyn MessageWrite, socket_addr: &IC::SocketAddr, ) -> Result<(), Error>
Generates the outbound message by making calls into
msg
.Source§fn supports_option(&self, option: OptionNumber) -> bool
fn supports_option(&self, option: OptionNumber) -> bool
Experimental: Used for determining if the given option seen in the reply message
is supported or not. Read more
Source§fn handler(
&mut self,
context: Result<&IC, Error>,
) -> Result<ResponseStatus<OwnedImmutableMessage>, Error>
fn handler( &mut self, context: Result<&IC, Error>, ) -> Result<ResponseStatus<OwnedImmutableMessage>, Error>
Handles the response to the outbound message.
Source§fn trans_params(&self) -> Option<TP>
fn trans_params(&self) -> Option<TP>
Experimental: Gets custom transmission parameters.
Source§impl<SD, IC> SendDesc<IC, OwnedImmutableMessage> for UnicastBlock2Collect<SD, IC>
impl<SD, IC> SendDesc<IC, OwnedImmutableMessage> for UnicastBlock2Collect<SD, IC>
Source§fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
Calculates the duration of the delay to wait before sending the next retransmission. Read more
Source§fn delay_to_restart(&self) -> Option<Duration>
fn delay_to_restart(&self) -> Option<Duration>
The delay to wait between when we have received a successful response and when
we should send out another request. Read more
Source§fn max_rtt(&self) -> Duration
fn max_rtt(&self) -> Duration
The maximum time to wait for an asynchronous response after having received an ACK.
Source§fn transmit_wait_duration(&self) -> Duration
fn transmit_wait_duration(&self) -> Duration
the maximum time from the first transmission of a Confirmable message to the time when
the sender gives up on receiving an acknowledgement or reset.
Source§fn write_payload(
&self,
msg: &mut dyn MessageWrite,
socket_addr: &IC::SocketAddr,
) -> Result<(), Error>
fn write_payload( &self, msg: &mut dyn MessageWrite, socket_addr: &IC::SocketAddr, ) -> Result<(), Error>
Generates the outbound message by making calls into
msg
.Source§fn write_options(
&self,
msg: &mut dyn OptionInsert,
socket_addr: &IC::SocketAddr,
start: Bound<OptionNumber>,
end: Bound<OptionNumber>,
) -> Result<(), Error>
fn write_options( &self, msg: &mut dyn OptionInsert, socket_addr: &IC::SocketAddr, start: Bound<OptionNumber>, end: Bound<OptionNumber>, ) -> Result<(), Error>
Defines which options are going to be included in the outbound message. Read more
Source§fn supports_option(&self, option: OptionNumber) -> bool
fn supports_option(&self, option: OptionNumber) -> bool
Experimental: Used for determining if the given option seen in the reply message
is supported or not. Read more
Source§fn handler(
&mut self,
context: Result<&IC, Error>,
) -> Result<ResponseStatus<OwnedImmutableMessage>, Error>
fn handler( &mut self, context: Result<&IC, Error>, ) -> Result<ResponseStatus<OwnedImmutableMessage>, Error>
Handles the response to the outbound message.
Source§fn trans_params(&self) -> Option<TP>
fn trans_params(&self) -> Option<TP>
Experimental: Gets custom transmission parameters.
impl Eq for OwnedImmutableMessage
impl StructuralPartialEq for OwnedImmutableMessage
Auto Trait Implementations§
impl Freeze for OwnedImmutableMessage
impl RefUnwindSafe for OwnedImmutableMessage
impl Send for OwnedImmutableMessage
impl Sync for OwnedImmutableMessage
impl Unpin for OwnedImmutableMessage
impl UnwindSafe for OwnedImmutableMessage
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