pub struct StringKeyCodec;Expand description
A codec for String keys that uses UTF-8 byte representation.
Trait Implementations§
Source§impl KeyCodec for StringKeyCodec
impl KeyCodec for StringKeyCodec
type Key = String
fn encoded_len(key: &Self::Key) -> usize
fn encode_into(key: &Self::Key, out: &mut Vec<u8>)
fn decode_from(bytes: &[u8]) -> Result<Self::Key, Error>
fn compare_encoded(encoded: &[u8], key: &Self::Key) -> Ordering
fn cmp_enc_vs_enc(a: &[u8], b: &[u8]) -> Ordering
Auto Trait Implementations§
impl Freeze for StringKeyCodec
impl RefUnwindSafe for StringKeyCodec
impl Send for StringKeyCodec
impl Sync for StringKeyCodec
impl Unpin for StringKeyCodec
impl UnsafeUnpin for StringKeyCodec
impl UnwindSafe for StringKeyCodec
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> 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