pub enum RoutingStep {
Forward(RoutingFrame),
Choice(Choice),
}
Expand description
A RoutingStep
represents a unit of progress in the routing
process.
Emitted by RoutingFrame::next_steps
, each step describes
how routing should proceed from a given frame:
-
RoutingStep::Forward
represents a deterministic hop to the next coordinate in the mesh, with an updatedRoutingFrame
. -
RoutingStep::Choice
indicates that routing cannot proceed until the caller selects one of several admissible indices. This allows for policy-driven or non-deterministic routing behavior, such as load balancing.
Variants§
Forward(RoutingFrame)
A deterministic routing hop to the next coordinate. Carries an
updated RoutingFrame
describing the new position and
residual selection.
Choice(Choice)
A deferred routing decision at the current dimension. Contains
a set of admissible indices and a residual RoutingFrame
to
continue routing once a choice is made.
Implementations§
Source§impl RoutingStep
impl RoutingStep
Sourcepub fn is_forward(&self) -> bool
pub fn is_forward(&self) -> bool
Returns true if this is a RoutingStep::Forward
, otherwise false
Sourcepub fn as_forward_mut(&mut self) -> Option<&mut RoutingFrame>
pub fn as_forward_mut(&mut self) -> Option<&mut RoutingFrame>
Optionally returns mutable references to the inner fields if this is a RoutingStep::Forward
, otherwise None
Sourcepub fn as_forward(&self) -> Option<&RoutingFrame>
pub fn as_forward(&self) -> Option<&RoutingFrame>
Optionally returns references to the inner fields if this is a RoutingStep::Forward
, otherwise None
Sourcepub fn into_forward(self) -> Result<RoutingFrame, RoutingStep>
pub fn into_forward(self) -> Result<RoutingFrame, RoutingStep>
Returns the inner fields if this is a RoutingStep::Forward
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_choice_mut(&mut self) -> Option<&mut Choice>
pub fn as_choice_mut(&mut self) -> Option<&mut Choice>
Optionally returns mutable references to the inner fields if this is a RoutingStep::Choice
, otherwise None
Sourcepub fn as_choice(&self) -> Option<&Choice>
pub fn as_choice(&self) -> Option<&Choice>
Optionally returns references to the inner fields if this is a RoutingStep::Choice
, otherwise None
Sourcepub fn into_choice(self) -> Result<Choice, RoutingStep>
pub fn into_choice(self) -> Result<Choice, RoutingStep>
Returns the inner fields if this is a RoutingStep::Choice
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl Clone for RoutingStep
impl Clone for RoutingStep
Source§fn clone(&self) -> RoutingStep
fn clone(&self) -> RoutingStep
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for RoutingStep
impl RefUnwindSafe for RoutingStep
impl Send for RoutingStep
impl Sync for RoutingStep
impl Unpin for RoutingStep
impl UnwindSafe for RoutingStep
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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