pub struct ExtensionRef<'a> {
pub type: i8,
pub data: &'a [u8],
}
Expand description
A borrowed view of a MessagePack extension value.
Note that the MessagePack header (FixExt vs Ext8/16/32) is determined by the
payload length when encoding. See ExtensionRef::to_format
.
Fields§
§type: i8
Application‑defined extension type code.
data: &'a [u8]
Borrowed payload bytes.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for ExtensionRef<'a>
impl<'a> Clone for ExtensionRef<'a>
Source§fn clone(&self) -> ExtensionRef<'a>
fn clone(&self) -> ExtensionRef<'a>
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<'a> Debug for ExtensionRef<'a>
impl<'a> Debug for ExtensionRef<'a>
Source§impl<'a> Decode<'a> for ExtensionRef<'a>
impl<'a> Decode<'a> for ExtensionRef<'a>
Source§impl<'a, W: IoWrite> Encode<W> for ExtensionRef<'a>
impl<'a, W: IoWrite> Encode<W> for ExtensionRef<'a>
Source§impl<'a> Ord for ExtensionRef<'a>
impl<'a> Ord for ExtensionRef<'a>
Source§fn cmp(&self, other: &ExtensionRef<'a>) -> Ordering
fn cmp(&self, other: &ExtensionRef<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for ExtensionRef<'a>
impl<'a> PartialEq for ExtensionRef<'a>
Source§impl<'a> PartialOrd for ExtensionRef<'a>
impl<'a> PartialOrd for ExtensionRef<'a>
Source§impl TryFrom<ExtensionRef<'_>> for Timestamp32
impl TryFrom<ExtensionRef<'_>> for Timestamp32
Source§type Error = TryFromTimeStampError
type Error = TryFromTimeStampError
The type returned in the event of a conversion error.
Source§impl TryFrom<ExtensionRef<'_>> for Timestamp64
impl TryFrom<ExtensionRef<'_>> for Timestamp64
Source§type Error = TryFromTimeStampError
type Error = TryFromTimeStampError
The type returned in the event of a conversion error.
Source§impl TryFrom<ExtensionRef<'_>> for Timestamp96
impl TryFrom<ExtensionRef<'_>> for Timestamp96
Source§type Error = TryFromTimeStampError
type Error = TryFromTimeStampError
The type returned in the event of a conversion error.
impl<'a> Copy for ExtensionRef<'a>
impl<'a> Eq for ExtensionRef<'a>
impl<'a> StructuralPartialEq for ExtensionRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExtensionRef<'a>
impl<'a> RefUnwindSafe for ExtensionRef<'a>
impl<'a> Send for ExtensionRef<'a>
impl<'a> Sync for ExtensionRef<'a>
impl<'a> Unpin for ExtensionRef<'a>
impl<'a> UnwindSafe for ExtensionRef<'a>
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