Struct mz_persist_types::ShardId
source · pub struct ShardId(pub(crate) [u8; 16]);
Expand description
An opaque identifier for a persist durable TVC (aka shard).
The std::string::ToString::to_string format of this may be stored durably or otherwise used as an interchange format. It can be parsed back using str::parse or std::str::FromStr::from_str.
Tuple Fields§
§0: [u8; 16]
Implementations§
Trait Implementations§
source§impl Arbitrary for ShardId
impl Arbitrary for ShardId
§type Parameters = <[u8; 16] as Arbitrary>::Parameters
type Parameters = <[u8; 16] as Arbitrary>::Parameters
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<<[u8; 16] as Arbitrary>::Strategy, fn(_: [u8; 16]) -> ShardId>
type Strategy = Map<<[u8; 16] as Arbitrary>::Strategy, fn(_: [u8; 16]) -> ShardId>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Codec for ShardId
impl Codec for ShardId
§type Storage = ()
type Storage = ()
A type used with Self::decode_from for allocation reuse. Set to
()
if unnecessary.§type Schema = ShardIdSchema
type Schema = ShardIdSchema
source§fn codec_name() -> String
fn codec_name() -> String
Name of the codec. Read more
source§fn encode<B: BufMut>(&self, buf: &mut B)
fn encode<B: BufMut>(&self, buf: &mut B)
Encode a key or value for permanent storage. Read more
source§fn decode<'a>(buf: &'a [u8], _schema: &ShardIdSchema) -> Result<Self, String>
fn decode<'a>(buf: &'a [u8], _schema: &ShardIdSchema) -> Result<Self, String>
Decode a key or value previous encoded with this codec’s
Codec::encode. Read more
source§fn encode_schema(_schema: &Self::Schema) -> Bytes
fn encode_schema(_schema: &Self::Schema) -> Bytes
Encode a schema for permanent storage. Read more
source§fn decode_schema(buf: &Bytes) -> Self::Schema
fn decode_schema(buf: &Bytes) -> Self::Schema
Decode a schema previous encoded with this codec’s
Self::encode_schema. Read more
source§impl<'de> Deserialize<'de> for ShardId
impl<'de> Deserialize<'de> for ShardId
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
source§impl Ord for ShardId
impl Ord for ShardId
source§impl PartialOrd for ShardId
impl PartialOrd for ShardId
source§impl RustType<String> for ShardId
impl RustType<String> for ShardId
source§fn into_proto(&self) -> String
fn into_proto(&self) -> String
Convert a
Self
into a Proto
value.source§fn from_proto(proto: String) -> Result<Self, TryFromProtoError>
fn from_proto(proto: String) -> Result<Self, TryFromProtoError>
source§fn into_proto_owned(self) -> Proto
fn into_proto_owned(self) -> Proto
A zero clone version of
Self::into_proto
that types can
optionally implement, otherwise, the default implementation
delegates to Self::into_proto
.source§impl Schema2<ShardId> for ShardIdSchema
impl Schema2<ShardId> for ShardIdSchema
§type ArrowColumn = GenericByteArray<GenericStringType<i32>>
type ArrowColumn = GenericByteArray<GenericStringType<i32>>
The type of column we decode from, and encoder will finish into.
§type Statistics = NoneStats
type Statistics = NoneStats
Statistics we collect for a schema of this type.
§type Decoder = SimpleColumnarDecoder<ShardId>
type Decoder = SimpleColumnarDecoder<ShardId>
Type that is able to decode values of
T
from Self::ArrowColumn
.§type Encoder = SimpleColumnarEncoder<ShardId>
type Encoder = SimpleColumnarEncoder<ShardId>
Type that is able to encoder values of
T
.source§fn decoder(&self, col: Self::ArrowColumn) -> Result<Self::Decoder, Error>
fn decoder(&self, col: Self::ArrowColumn) -> Result<Self::Decoder, Error>
Returns a type that is able to decode instances of
T
from the provider column.source§fn decoder_any(&self, col: &dyn Array) -> Result<Self::Decoder, Error>
fn decoder_any(&self, col: &dyn Array) -> Result<Self::Decoder, Error>
Returns a type that is able to decode instances of
T
from a type erased
arrow::array::Array
, erroring if the provided array is not Self::ArrowColumn
.source§impl SimpleColumnarData for ShardId
impl SimpleColumnarData for ShardId
§type ArrowBuilder = GenericByteBuilder<GenericStringType<i32>>
type ArrowBuilder = GenericByteBuilder<GenericStringType<i32>>
Type of
arrow
builder that we encode data into.§type ArrowColumn = GenericByteArray<GenericStringType<i32>>
type ArrowColumn = GenericByteArray<GenericStringType<i32>>
Type of
arrow
array the we decode data from.source§fn goodbytes(builder: &Self::ArrowBuilder) -> usize
fn goodbytes(builder: &Self::ArrowBuilder) -> usize
The number of actual data bytes this item represents.
source§fn push(&self, builder: &mut Self::ArrowBuilder)
fn push(&self, builder: &mut Self::ArrowBuilder)
Encode
self
into builder
.source§fn push_null(builder: &mut Self::ArrowBuilder)
fn push_null(builder: &mut Self::ArrowBuilder)
Encode a null value into
builder
.source§fn read(&mut self, idx: usize, column: &Self::ArrowColumn)
fn read(&mut self, idx: usize, column: &Self::ArrowColumn)
Decode an instance of
self
from column
.impl Copy for ShardId
impl Eq for ShardId
impl StructuralPartialEq for ShardId
Auto Trait Implementations§
impl Freeze for ShardId
impl RefUnwindSafe for ShardId
impl Send for ShardId
impl Sync for ShardId
impl Unpin for ShardId
impl UnwindSafe for ShardId
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.