pub enum InlineMessage<M> {
Inline(M),
Boxed(Box<M>),
}Expand description
Message storage that inlines small messages to avoid allocations
Variants§
Inline(M)
Small message stored inline (no heap allocation)
Boxed(Box<M>)
Large message stored on heap (only when necessary)
Implementations§
Source§impl<M> InlineMessage<M>
impl<M> InlineMessage<M>
Sourcepub fn into_inner(self) -> M
pub fn into_inner(self) -> M
Take the message out of storage
Trait Implementations§
Source§impl<M: Clone> Clone for InlineMessage<M>
impl<M: Clone> Clone for InlineMessage<M>
Source§fn clone(&self) -> InlineMessage<M>
fn clone(&self) -> InlineMessage<M>
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 moreAuto Trait Implementations§
impl<M> Freeze for InlineMessage<M>where
M: Freeze,
impl<M> RefUnwindSafe for InlineMessage<M>where
M: RefUnwindSafe,
impl<M> Send for InlineMessage<M>where
M: Send,
impl<M> Sync for InlineMessage<M>where
M: Sync,
impl<M> Unpin for InlineMessage<M>where
M: Unpin,
impl<M> UnwindSafe for InlineMessage<M>where
M: 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<T> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter