pub struct KeySerializer { /* private fields */ }Expand description
A builder for constructing binary keys using keycode encoding
Implementations§
Source§impl KeySerializer
impl KeySerializer
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create with pre-allocated capacity
Sourcepub fn extend_bool(&mut self, value: bool) -> &mut Self
pub fn extend_bool(&mut self, value: bool) -> &mut Self
Extend with bool value
Sourcepub fn extend_f32(&mut self, value: f32) -> &mut Self
pub fn extend_f32(&mut self, value: f32) -> &mut Self
Extend with f32 value
Sourcepub fn extend_f64(&mut self, value: f64) -> &mut Self
pub fn extend_f64(&mut self, value: f64) -> &mut Self
Extend with f64 value
Sourcepub fn extend_i16<T: Into<i16>>(&mut self, value: T) -> &mut Self
pub fn extend_i16<T: Into<i16>>(&mut self, value: T) -> &mut Self
Extend with i16 value
Sourcepub fn extend_i32<T: Into<i32>>(&mut self, value: T) -> &mut Self
pub fn extend_i32<T: Into<i32>>(&mut self, value: T) -> &mut Self
Extend with i32 value
Sourcepub fn extend_i64<T: Into<i64>>(&mut self, value: T) -> &mut Self
pub fn extend_i64<T: Into<i64>>(&mut self, value: T) -> &mut Self
Extend with i64 value
Sourcepub fn extend_i128<T: Into<i128>>(&mut self, value: T) -> &mut Self
pub fn extend_i128<T: Into<i128>>(&mut self, value: T) -> &mut Self
Extend with i128 value
Sourcepub fn extend_u16<T: Into<u16>>(&mut self, value: T) -> &mut Self
pub fn extend_u16<T: Into<u16>>(&mut self, value: T) -> &mut Self
Extend with u16 value
Sourcepub fn extend_u32<T: Into<u32>>(&mut self, value: T) -> &mut Self
pub fn extend_u32<T: Into<u32>>(&mut self, value: T) -> &mut Self
Extend with u32 value
Sourcepub fn extend_u64<T: Into<u64>>(&mut self, value: T) -> &mut Self
pub fn extend_u64<T: Into<u64>>(&mut self, value: T) -> &mut Self
Extend with u64 value
Sourcepub fn extend_u128<T: Into<u128>>(&mut self, value: T) -> &mut Self
pub fn extend_u128<T: Into<u128>>(&mut self, value: T) -> &mut Self
Extend with u128 value
Sourcepub fn extend_bytes<T: AsRef<[u8]>>(&mut self, bytes: T) -> &mut Self
pub fn extend_bytes<T: AsRef<[u8]>>(&mut self, bytes: T) -> &mut Self
Extend with raw bytes
Sourcepub fn extend_str<T: AsRef<str>>(&mut self, s: T) -> &mut Self
pub fn extend_str<T: AsRef<str>>(&mut self, s: T) -> &mut Self
Extend with string (UTF-8 bytes)
Sourcepub fn to_encoded_key(self) -> EncodedKey
pub fn to_encoded_key(self) -> EncodedKey
Consume serializer and return an EncodedKey directly
Sourcepub fn extend_primitive_id(
&mut self,
primitive: impl Into<PrimitiveId>,
) -> &mut Self
pub fn extend_primitive_id( &mut self, primitive: impl Into<PrimitiveId>, ) -> &mut Self
Extend with a PrimitiveId value (includes type discriminator)
Sourcepub fn extend_index_id(&mut self, index: impl Into<IndexId>) -> &mut Self
pub fn extend_index_id(&mut self, index: impl Into<IndexId>) -> &mut Self
Extend with an IndexId value (includes type discriminator)
Sourcepub fn extend_serialize<T: Serialize>(&mut self, value: &T) -> &mut Self
pub fn extend_serialize<T: Serialize>(&mut self, value: &T) -> &mut Self
Extend with a serializable value using keycode encoding
Sourcepub fn extend_raw(&mut self, bytes: &[u8]) -> &mut Self
pub fn extend_raw(&mut self, bytes: &[u8]) -> &mut Self
Extend with raw bytes (no encoding)
Sourcepub fn extend_date(&mut self, date: &Date) -> &mut Self
pub fn extend_date(&mut self, date: &Date) -> &mut Self
Extend with Date value
Sourcepub fn extend_datetime(&mut self, datetime: &DateTime) -> &mut Self
pub fn extend_datetime(&mut self, datetime: &DateTime) -> &mut Self
Extend with DateTime value
Sourcepub fn extend_time(&mut self, time: &Time) -> &mut Self
pub fn extend_time(&mut self, time: &Time) -> &mut Self
Extend with Time value
Sourcepub fn extend_duration(&mut self, duration: &Duration) -> &mut Self
pub fn extend_duration(&mut self, duration: &Duration) -> &mut Self
Extend with Duration value
Sourcepub fn extend_row_number(&mut self, row_number: &RowNumber) -> &mut Self
pub fn extend_row_number(&mut self, row_number: &RowNumber) -> &mut Self
Extend with RowNumber value
Sourcepub fn extend_identity_id(&mut self, id: &IdentityId) -> &mut Self
pub fn extend_identity_id(&mut self, id: &IdentityId) -> &mut Self
Extend with IdentityId value
Sourcepub fn extend_uuid4(&mut self, uuid: &Uuid4) -> &mut Self
pub fn extend_uuid4(&mut self, uuid: &Uuid4) -> &mut Self
Extend with Uuid4 value
Sourcepub fn extend_uuid7(&mut self, uuid: &Uuid7) -> &mut Self
pub fn extend_uuid7(&mut self, uuid: &Uuid7) -> &mut Self
Extend with Uuid7 value
Sourcepub fn extend_blob(&mut self, blob: &Blob) -> &mut Self
pub fn extend_blob(&mut self, blob: &Blob) -> &mut Self
Extend with Blob value
Sourcepub fn extend_int(&mut self, int: &Int) -> &mut Self
pub fn extend_int(&mut self, int: &Int) -> &mut Self
Extend with arbitrary precision Int value
Sourcepub fn extend_uint(&mut self, uint: &Uint) -> &mut Self
pub fn extend_uint(&mut self, uint: &Uint) -> &mut Self
Extend with arbitrary precision Uint value
Sourcepub fn extend_decimal(&mut self, decimal: &Decimal) -> &mut Self
pub fn extend_decimal(&mut self, decimal: &Decimal) -> &mut Self
Extend with Decimal value
Sourcepub fn extend_value(&mut self, value: &Value) -> &mut Self
pub fn extend_value(&mut self, value: &Value) -> &mut Self
Extend with a Value based on its type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeySerializer
impl RefUnwindSafe for KeySerializer
impl Send for KeySerializer
impl Sync for KeySerializer
impl Unpin for KeySerializer
impl UnsafeUnpin for KeySerializer
impl UnwindSafe for KeySerializer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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