pub struct HashShard {
pub shards: usize,
pub index: usize,
}Expand description
Parsed {shards, index} hash-modulo shard descriptor, produced by
plan_hash_shards and applied by an object-store / file source’s
apply_shard.
Fields§
§shards: usizeTotal shard count in this run’s set.
index: usizeThis shard’s index in 0..shards.
Implementations§
Source§impl HashShard
impl HashShard
Sourcepub fn from_spec(spec: &ShardSpec) -> Option<Self>
pub fn from_spec(spec: &ShardSpec) -> Option<Self>
Parse from a ShardSpec descriptor produced by plan_hash_shards.
Returns None for a malformed descriptor (missing/ill-typed shards
or index) — including the whole-dataset shard’s null descriptor,
so callers must check ShardSpec::is_whole first.
Trait Implementations§
impl Copy for HashShard
impl Eq for HashShard
impl StructuralPartialEq for HashShard
Auto Trait Implementations§
impl Freeze for HashShard
impl RefUnwindSafe for HashShard
impl Send for HashShard
impl Sync for HashShard
impl Unpin for HashShard
impl UnsafeUnpin for HashShard
impl UnwindSafe for HashShard
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§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