pub struct FramedSpan { /* private fields */ }Expand description
A verbatim payload inside a strictly larger stored span.
The framing is the declared number and it is non-zero, so a stored span that does not exceed its payload is unrepresentable. The stored span is derived from the pair and never stated beside it, so a span that disagrees with its own payload and framing is unrepresentable too.
Implementations§
Source§impl FramedSpan
impl FramedSpan
Sourcepub const fn from_parts(payload: AllocatedLen, framing: NonZeroU32) -> Self
pub const fn from_parts(payload: AllocatedLen, framing: NonZeroU32) -> Self
A payload-byte payload wrapped in framing bytes of container framing.
payload is the length of a live allocation and so at most isize::MAX
and framing at most u32::MAX, and the module assertions above prove
that sum inside u64, so Self::stored adds it unchecked and this
mint is total.
Trait Implementations§
Source§impl Clone for FramedSpan
impl Clone for FramedSpan
impl Copy for FramedSpan
Source§impl Debug for FramedSpan
impl Debug for FramedSpan
impl Eq for FramedSpan
Source§impl PartialEq for FramedSpan
impl PartialEq for FramedSpan
impl StructuralPartialEq for FramedSpan
Auto Trait Implementations§
impl Freeze for FramedSpan
impl RefUnwindSafe for FramedSpan
impl Send for FramedSpan
impl Sync for FramedSpan
impl Unpin for FramedSpan
impl UnsafeUnpin for FramedSpan
impl UnwindSafe for FramedSpan
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