pub struct EncodedMessageView<EM: EncodedMessage> { /* private fields */ }
Expand description
A wrapper around any data structure containing a readable message
This is not Sync
– while it is currently a zero-sized wrapper, it may gain optimizations
later such as memoizing where the payload begins (and this is only practical with interior
mutability).
See Message for how this does not perform early validation and handles message errors.
Implementations§
Source§impl<EM: EncodedMessage> EncodedMessageView<EM>
impl<EM: EncodedMessage> EncodedMessageView<EM>
Trait Implementations§
Source§impl<EM: EncodedMessage> AsRef<EM> for EncodedMessageView<EM>
When the inner item stores more than just the code and encoded options, this can be used to
gain read-only access to any additional data. (Mutating access is blocked to ensure that future
optimizations like memoizing the payload position are possible; it might still be enabled if
memoized data is cleared just to be on the safe side).
impl<EM: EncodedMessage> AsRef<EM> for EncodedMessageView<EM>
When the inner item stores more than just the code and encoded options, this can be used to gain read-only access to any additional data. (Mutating access is blocked to ensure that future optimizations like memoizing the payload position are possible; it might still be enabled if memoized data is cleared just to be on the safe side).
Source§impl<EM: Clone + EncodedMessage> Clone for EncodedMessageView<EM>
impl<EM: Clone + EncodedMessage> Clone for EncodedMessageView<EM>
Source§fn clone(&self) -> EncodedMessageView<EM>
fn clone(&self) -> EncodedMessageView<EM>
Returns a duplicate 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<EM: Debug + EncodedMessage> Debug for EncodedMessageView<EM>
impl<EM: Debug + EncodedMessage> Debug for EncodedMessageView<EM>
Source§impl<EM> Format for EncodedMessageView<EM>
impl<EM> Format for EncodedMessageView<EM>
Source§impl<EM: EncodedMessage> ReadableMessage for EncodedMessageView<EM>
impl<EM: EncodedMessage> ReadableMessage for EncodedMessageView<EM>
Source§type Code = u8
type Code = u8
See
Self::code()
Source§type MessageOption<'a> = MessageOption<'a>
where
Self: 'a
type MessageOption<'a> = MessageOption<'a> where Self: 'a
Type of an individual option, indiciating its option number and value
Source§type OptionsIter<'a> = OptionsIter<'a>
where
Self: 'a
type OptionsIter<'a> = OptionsIter<'a> where Self: 'a
See
Self::options()
Source§fn options(&self) -> OptionsIter<'_> ⓘ
fn options(&self) -> OptionsIter<'_> ⓘ
Produce all options in arbitrary order as an iterator Read more
Source§fn with_static_type_annotation(&self) -> Option<RefWithStaticType<'_, Self>>
fn with_static_type_annotation(&self) -> Option<RefWithStaticType<'_, Self>>
Type ID of Self or a ’static version of Self Read more
Auto Trait Implementations§
impl<EM> Freeze for EncodedMessageView<EM>where
EM: Freeze,
impl<EM> !RefUnwindSafe for EncodedMessageView<EM>
impl<EM> Send for EncodedMessageView<EM>where
EM: Send,
impl<EM> !Sync for EncodedMessageView<EM>
impl<EM> Unpin for EncodedMessageView<EM>where
EM: Unpin,
impl<EM> UnwindSafe for EncodedMessageView<EM>where
EM: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<M> ShowMessageExt for Mwhere
M: ReadableMessage,
impl<M> ShowMessageExt for Mwhere
M: ReadableMessage,
Source§fn show(&self) -> ShowMessage<'_, Self>
fn show(&self) -> ShowMessage<'_, Self>
Wraps the message to have a
core::fmt::Debug
imlementation, and also provide
[defmt_0_3::Format
] if the defmt_0_3
feature is selected. Read more