Struct mz_persist_client::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: <ShardId as Arbitrary>::Parameters,
) -> <ShardId as Arbitrary>::Strategy
fn arbitrary_with( _top: <ShardId as Arbitrary>::Parameters, ) -> <ShardId as Arbitrary>::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>(&self, buf: &mut B)where
B: BufMut,
fn encode<B>(&self, buf: &mut B)where
B: BufMut,
Encode a key or value for permanent storage. Read more
source§fn decode<'a>(buf: &'a [u8], _schema: &ShardIdSchema) -> Result<ShardId, String>
fn decode<'a>(buf: &'a [u8], _schema: &ShardIdSchema) -> Result<ShardId, String>
Decode a key or value previous encoded with this codec’s
Codec::encode. Read more
source§fn encode_schema(_schema: &<ShardId as Codec>::Schema) -> Bytes
fn encode_schema(_schema: &<ShardId as Codec>::Schema) -> Bytes
Encode a schema for permanent storage. Read more
source§fn decode_schema(buf: &Bytes) -> <ShardId as Codec>::Schema
fn decode_schema(buf: &Bytes) -> <ShardId as Codec>::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<ShardId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShardId, <__D as Deserializer<'de>>::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<ShardId, TryFromProtoError>
fn from_proto(proto: String) -> Result<ShardId, 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 Serialize for ShardId
impl Serialize for ShardId
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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: &<ShardId as SimpleColumnarData>::ArrowBuilder) -> usize
fn goodbytes(builder: &<ShardId as SimpleColumnarData>::ArrowBuilder) -> usize
The number of actual data bytes this item represents.
source§fn push(&self, builder: &mut <ShardId as SimpleColumnarData>::ArrowBuilder)
fn push(&self, builder: &mut <ShardId as SimpleColumnarData>::ArrowBuilder)
Encode
self
into builder
.source§fn push_null(builder: &mut <ShardId as SimpleColumnarData>::ArrowBuilder)
fn push_null(builder: &mut <ShardId as SimpleColumnarData>::ArrowBuilder)
Encode a null value into
builder
.source§fn read(
&mut self,
idx: usize,
column: &<ShardId as SimpleColumnarData>::ArrowColumn,
)
fn read( &mut self, idx: usize, column: &<ShardId as SimpleColumnarData>::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<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
Creates a shared type from an unshared type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PreferredContainer for T
impl<T> PreferredContainer 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
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.