EncodedKeyBuilder

Struct EncodedKeyBuilder 

Source
pub struct EncodedKeyBuilder { /* private fields */ }
Expand description

A builder for constructing EncodedKey values using keycode encoding

This provides a fluent API for building composite keys with proper order-preserving encoding.

Implementations§

Source§

impl EncodedKeyBuilder

Source

pub fn new() -> Self

Create a new builder

Source

pub fn with_capacity(capacity: usize) -> Self

Create a builder with pre-allocated capacity

Source

pub fn build(self) -> EncodedKey

Build the EncodedKey

Source

pub fn bool(self, value: bool) -> Self

Extend with bool value

Source

pub fn f32(self, value: f32) -> Self

Extend with f32 value

Source

pub fn f64(self, value: f64) -> Self

Extend with f64 value

Source

pub fn i8<T: Into<i8>>(self, value: T) -> Self

Extend with i8 value

Source

pub fn i16<T: Into<i16>>(self, value: T) -> Self

Extend with i16 value

Source

pub fn i32<T: Into<i32>>(self, value: T) -> Self

Extend with i32 value

Source

pub fn i64<T: Into<i64>>(self, value: T) -> Self

Extend with i64 value

Source

pub fn i128<T: Into<i128>>(self, value: T) -> Self

Extend with i128 value

Source

pub fn u8<T: Into<u8>>(self, value: T) -> Self

Extend with u8 value

Source

pub fn u16<T: Into<u16>>(self, value: T) -> Self

Extend with u16 value

Source

pub fn u32<T: Into<u32>>(self, value: T) -> Self

Extend with u32 value

Source

pub fn u64<T: Into<u64>>(self, value: T) -> Self

Extend with u64 value

Source

pub fn u128<T: Into<u128>>(self, value: T) -> Self

Extend with u128 value

Source

pub fn bytes<T: AsRef<[u8]>>(self, bytes: T) -> Self

Extend with raw bytes (with encoding)

Source

pub fn str<T: AsRef<str>>(self, s: T) -> Self

Extend with string (UTF-8 bytes)

Source

pub fn source_id(self, source: impl Into<SourceId>) -> Self

Extend with a SourceId value

Source

pub fn index_id(self, index: impl Into<IndexId>) -> Self

Extend with an IndexId value

Source

pub fn serialize<T: Serialize>(self, value: &T) -> Self

Extend with a serializable value using keycode encoding

Source

pub fn raw(self, bytes: &[u8]) -> Self

Extend with raw bytes (no encoding)

Source

pub fn len(&self) -> usize

Get current buffer length

Source

pub fn is_empty(&self) -> bool

Check if buffer is empty

Source

pub fn date(self, date: &Date) -> Self

Extend with Date value

Source

pub fn datetime(self, datetime: &DateTime) -> Self

Extend with DateTime value

Source

pub fn time(self, time: &Time) -> Self

Extend with Time value

Source

pub fn duration(self, duration: &Duration) -> Self

Extend with Duration value

Source

pub fn row_number(self, row_number: &RowNumber) -> Self

Extend with RowNumber value

Source

pub fn identity_id(self, id: &IdentityId) -> Self

Extend with IdentityId value

Source

pub fn uuid4(self, uuid: &Uuid4) -> Self

Extend with Uuid4 value

Source

pub fn uuid7(self, uuid: &Uuid7) -> Self

Extend with Uuid7 value

Source

pub fn blob(self, blob: &Blob) -> Self

Extend with Blob value

Source

pub fn int(self, int: &Int) -> Self

Extend with arbitrary precision Int value

Source

pub fn uint(self, uint: &Uint) -> Self

Extend with arbitrary precision Uint value

Source

pub fn decimal(self, decimal: &Decimal) -> Self

Extend with Decimal value

Source

pub fn value(self, value: &Value) -> Self

Extend with a Value based on its type

Trait Implementations§

Source§

impl Default for EncodedKeyBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more