SingleRingBuilder

Struct SingleRingBuilder 

Source
pub struct SingleRingBuilder { /* private fields */ }
Expand description

Builder for ExecutionModelV1::SingleRing specs.

This is intentionally small: it helps construct valid v1 specs without macros.

Implementations§

Source§

impl SingleRingBuilder

Source

pub fn new() -> Self

Create a new builder with v1 defaults.

Source

pub fn shards(&mut self, shards: u32) -> &mut Self

Set the number of PerKey shards.

Source

pub fn ordering(&mut self, ordering: OrderingV1) -> &mut Self

Set requested ordering semantics.

Source

pub fn producer(&mut self, producer: SingleRingProducerV1) -> &mut Self

Set requested producer model.

Source

pub fn scheduling(&mut self, scheduling: SingleRingSchedulingV1) -> &mut Self

Set requested scheduling model.

Source

pub fn shard_key(&mut self, shard_key: ShardKeyV1) -> &mut Self

Set the shard key extractor.

Source

pub fn push_source_stage(&mut self, op: StageOpV1) -> Result<u32, SpecError>

Add a stage that depends directly on the producer cursor.

Source

pub fn push_stage( &mut self, op: StageOpV1, depends_on: &[u32], ) -> Result<u32, SpecError>

Add a stage with explicit dependencies.

depends_on contains stage indices; each dependency must reference a stage that has already been added.

Source

pub fn build(self) -> Result<PipelineSpecV1, SpecError>

Build the full PipelineSpecV1.

Trait Implementations§

Source§

impl Default for SingleRingBuilder

Available on crate feature alloc only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.