pub enum WireSize {
Fixed(u32),
LengthPrefixed,
}Expand description
On-disk wire layout descriptor for a custom-typed column.
Tells the snapshot-driven record codec how many bytes a custom column
occupies in a stored record, without needing access to the user’s
concrete Encode impl. Derived from <T as Encode>::SIZE at the time
the snapshot is built.
Variants§
Fixed(u32)
Column occupies exactly N bytes per record (Encode::SIZE = Fixed(N)).
LengthPrefixed
Column body is preceded by a 2-byte little-endian length prefix
(the convention used by Text, Blob, Json, and any custom
dynamic-size type — Encode::SIZE = Dynamic).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WireSize
impl<'de> Deserialize<'de> for WireSize
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for WireSize
impl Eq for WireSize
impl StructuralPartialEq for WireSize
Auto Trait Implementations§
impl Freeze for WireSize
impl RefUnwindSafe for WireSize
impl Send for WireSize
impl Sync for WireSize
impl Unpin for WireSize
impl UnsafeUnpin for WireSize
impl UnwindSafe for WireSize
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