pub struct Choice { /* private fields */ }Expand description
A deferred routing decision as contained in a
RoutingStep::Choice.
A Choice contains:
candidates: the admissible indices at the current dimensionframe: the residualRoutingFramedescribing how routing continues once a choice is made
To continue routing, the caller must select one of the
candidates and call Choice::choose to produce the
corresponding RoutingStep::Forward.
Implementations§
Source§impl Choice
impl Choice
Sourcepub fn candidates(&self) -> &[usize]
pub fn candidates(&self) -> &[usize]
Returns the list of admissible indices at the current dimension.
These represent the valid choices that the caller can select from when resolving this deferred routing step.
Sourcepub fn frame(&self) -> &RoutingFrame
pub fn frame(&self) -> &RoutingFrame
Returns a reference to the residual RoutingFrame
associated with this choice.
This frame encodes the selection and mesh context to be used once a choice is made, and routing continues at the next dimension.
Sourcepub fn choose(self, index: usize) -> RoutingStep
pub fn choose(self, index: usize) -> RoutingStep
Resolves the choice by selecting a specific index.
Constrains the residual selection to the chosen index at the
current dimension and returns a RoutingStep::Forward for
continued routing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnwindSafe for Choice
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