pub struct PartitionSpec {
pub chunking: Chunking,
pub window: Option<(Bound, Bound)>,
pub order: PartitionOrder,
}Expand description
A parsed partition spec:
spec := chunking [ "in" window ] [ order ]
window := Form 1 range (e.g. `25%..75%`)
order := unchanged | smallest_first | largest_first | randomThe window scopes the chunking: the chunking resolves
against the window’s ordinal range instead of the full
extent, so percentages inside the chunking are relative to
the window. Without a window, the chunking spans the
whole extent. The order keyword reorders the resolved list
for iteration; partition idx keeps identifying the
generation position.
Fields§
§chunking: ChunkingThe shape that carves the (windowed) domain.
window: Option<(Bound, Bound)>Optional in start..end window the chunking applies to.
order: PartitionOrderIteration order of the resolved list.
Implementations§
Source§impl PartitionSpec
impl PartitionSpec
Sourcepub fn single_range(start: Bound, end: Bound) -> Self
pub fn single_range(start: Bound, end: Bound) -> Self
A windowless, unordered Form 1 spec.
Sourcepub fn delta_list(deltas: Vec<Bound>) -> Self
pub fn delta_list(deltas: Vec<Bound>) -> Self
A windowless, unordered Form 2/3 spec.
Trait Implementations§
Source§impl Clone for PartitionSpec
impl Clone for PartitionSpec
Source§fn clone(&self) -> PartitionSpec
fn clone(&self) -> PartitionSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartitionSpec
impl Debug for PartitionSpec
Source§impl PartialEq for PartitionSpec
impl PartialEq for PartitionSpec
Source§impl ReflectedValue for PartitionSpec
impl ReflectedValue for PartitionSpec
Source§fn display(&self) -> String
fn display(&self) -> String
Human-readable string representation.
Used by stdout adapter, logging, and diagnostics.
Source§fn to_json_value(&self) -> Value
fn to_json_value(&self) -> Value
JSON representation for serialization and HTTP bodies.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Downcast to the concrete type. Only works when the consuming
code has the concrete type in scope (same crate or shared dep).
Source§fn clone_reflected(&self) -> Box<dyn ReflectedValue>
fn clone_reflected(&self) -> Box<dyn ReflectedValue>
Clone into a new boxed trait object.
Source§fn try_as_str(&self) -> Option<String>
fn try_as_str(&self) -> Option<String>
Try to represent as a string. Many types have a canonical
string form (UUIDs, timestamps, IP addresses).
Source§fn try_as_u64(&self) -> Option<u64>
fn try_as_u64(&self) -> Option<u64>
Try to represent as u64.
Source§fn try_as_f64(&self) -> Option<f64>
fn try_as_f64(&self) -> Option<f64>
Try to represent as f64.
Source§fn try_as_bytes(&self) -> Option<&[u8]>
fn try_as_bytes(&self) -> Option<&[u8]>
Try to represent as bytes.
impl StructuralPartialEq for PartitionSpec
Auto Trait Implementations§
impl Freeze for PartitionSpec
impl RefUnwindSafe for PartitionSpec
impl Send for PartitionSpec
impl Sync for PartitionSpec
impl Unpin for PartitionSpec
impl UnsafeUnpin for PartitionSpec
impl UnwindSafe for PartitionSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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