pub struct SplitNameCodec;Expand description
Split name codec. Splits on the first space into identifier and description, storing both with a length prefix for exact reconstruction.
On-disk layout per name:
[id_len: u32 le] [id_bytes] [desc_bytes]Trait Implementations§
Source§impl Clone for SplitNameCodec
impl Clone for SplitNameCodec
Source§fn clone(&self) -> SplitNameCodec
fn clone(&self) -> SplitNameCodec
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 Debug for SplitNameCodec
impl Debug for SplitNameCodec
Source§impl Default for SplitNameCodec
impl Default for SplitNameCodec
Source§fn default() -> SplitNameCodec
fn default() -> SplitNameCodec
Returns the “default value” for a type. Read more
Source§impl NameCodec for SplitNameCodec
impl NameCodec for SplitNameCodec
Source§fn encode_into(name: &[u8], output: &mut Vec<u8>) -> Result<(), DryIceError>
fn encode_into(name: &[u8], output: &mut Vec<u8>) -> Result<(), DryIceError>
Encode raw name bytes, appending the encoded bytes directly
into the provided output buffer. Read more
Source§fn decode(
encoded: &[u8],
_original_len: usize,
) -> Result<SplitName, DryIceError>
fn decode( encoded: &[u8], _original_len: usize, ) -> Result<SplitName, DryIceError>
Decode an encoded buffer into the codec’s decoded representation. Read more
Source§fn as_bytes(decoded: &SplitName) -> &[u8] ⓘ
fn as_bytes(decoded: &SplitName) -> &[u8] ⓘ
View the decoded name as raw bytes for use in
SeqRecordLike.Source§const IS_IDENTITY: bool = false
const IS_IDENTITY: bool = false
Whether the encoded form is identical to the raw input bytes.
impl Copy for SplitNameCodec
Auto Trait Implementations§
impl Freeze for SplitNameCodec
impl RefUnwindSafe for SplitNameCodec
impl Send for SplitNameCodec
impl Sync for SplitNameCodec
impl Unpin for SplitNameCodec
impl UnsafeUnpin for SplitNameCodec
impl UnwindSafe for SplitNameCodec
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more