Skip to main content

Partition

Struct Partition 

Source
pub struct Partition {
    pub idx: u64,
    pub count: u64,
    pub start_ord: u64,
    pub end_ord: u64,
    pub start_pct: f64,
    pub end_pct: f64,
    pub base_extent: u64,
}
Expand description

A single resolved partition: an absolute ordinal range with derived percentage and index metadata.

cardinality() returns end_ord - start_ord — the number of ordinals the partition covers.

Fields§

§idx: u64

0-based position in the resolved partition list (generation order — stable under spec-level reordering).

§count: u64

Total number of partitions in the list this one was resolved as part of. 1 for a single-partition spec. Carried per-partition so an iter-var or q.cursor projection can answer partition_count (and the status banner can render i/n) without the originating list.

§start_ord: u64

Absolute ordinal at partition start (inclusive).

§end_ord: u64

Absolute ordinal at partition end (exclusive).

§start_pct: f64

Start as a percentage of the base extent, [0.0, 100.0).

§end_pct: f64

End as a percentage of the base extent, (0.0, 100.0].

§base_extent: u64

The base extent the partition was resolved against. Stored so consumers can recompute pcts or compare partitions resolved against different extents.

Implementations§

Source§

impl Partition

Source

pub fn cardinality(&self) -> u64

Number of ordinals in the partition: end_ord - start_ord.

Trait Implementations§

Source§

impl Clone for Partition

Source§

fn clone(&self) -> Partition

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Partition

Source§

impl Debug for Partition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Partition

Source§

fn eq(&self, other: &Partition) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl ReflectedValue for Partition

Source§

fn type_name(&self) -> &str

Type name for diagnostics and describe output.
Source§

fn display(&self) -> String

Human-readable string representation. Used by stdout adapter, logging, and diagnostics.
Source§

fn to_json_value(&self) -> Value

JSON representation for serialization and HTTP bodies.
Source§

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>

Clone into a new boxed trait object.
Source§

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>

Try to represent as u64.
Source§

fn try_as_f64(&self) -> Option<f64>

Try to represent as f64.
Source§

fn try_as_bytes(&self) -> Option<&[u8]>

Try to represent as bytes.
Source§

impl StructuralPartialEq for Partition

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

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
Source§

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

Source§

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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