pub struct InterpolatedSearchOutcome(/* private fields */);Expand description
Grid-owned adapter for an interpolated found/no-path outcome.
The shared SearchOutcome operations remain available through
std::ops::Deref,
while this wrapper owns the interpolated lane’s path-quality semantics.
Implementations§
Source§impl InterpolatedSearchOutcome
impl InterpolatedSearchOutcome
Sourcepub const fn found(
path: InterpolatedPathOutcome,
stats: InterpolatedSearchStats,
) -> InterpolatedSearchOutcome
pub const fn found( path: InterpolatedPathOutcome, stats: InterpolatedSearchStats, ) -> InterpolatedSearchOutcome
Creates a path-bearing interpolated outcome.
Sourcepub const fn no_path(
stats: InterpolatedSearchStats,
) -> InterpolatedSearchOutcome
pub const fn no_path( stats: InterpolatedSearchStats, ) -> InterpolatedSearchOutcome
Creates an interpolated outcome where no path was available.
Sourcepub const fn as_search_outcome(
&self,
) -> &SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
pub const fn as_search_outcome( &self, ) -> &SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
Borrows the underlying shared search outcome.
Sourcepub fn into_search_outcome(
self,
) -> SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
pub fn into_search_outcome( self, ) -> SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
Consumes this adapter and returns the underlying shared search outcome.
Sourcepub fn expected_kind(&self) -> InterpolatedExpectedKind
pub fn expected_kind(&self) -> InterpolatedExpectedKind
Maps this search outcome onto the fixture/oracle expected-kind enum.
NoPath becomes InterpolatedExpectedKind::NoPath; found outcomes
preserve found / partial / fallback quality.
Sourcepub fn path_outcome(&self) -> Option<InterpolatedPathOutcomeRef<'_>>
pub fn path_outcome(&self) -> Option<InterpolatedPathOutcomeRef<'_>>
Borrows the path outcome when the search found a path of any quality.
Methods from Deref<Target = SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>>§
Sourcepub fn is_found(&self) -> bool
pub fn is_found(&self) -> bool
Whether this outcome is Self::Found (validation failures are outer Err).
Sourcepub fn path(&self) -> Option<&P>
pub fn path(&self) -> Option<&P>
Path when found; None for Self::NoPath.
Sourcepub fn stats(&self) -> &S
pub fn stats(&self) -> &S
Work stats from either branch (Found and NoPath both always carry stats).
Sourcepub fn cost(&self) -> Option<<P as SearchPathCost>::Cost>
pub fn cost(&self) -> Option<<P as SearchPathCost>::Cost>
Path cost when found; None for no-path outcomes.
Sourcepub fn visited_nodes(&self) -> usize
pub fn visited_nodes(&self) -> usize
Algorithm-defined visit count from either found or no-path stats.
Trait Implementations§
Source§impl Clone for InterpolatedSearchOutcome
impl Clone for InterpolatedSearchOutcome
Source§fn clone(&self) -> InterpolatedSearchOutcome
fn clone(&self) -> InterpolatedSearchOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InterpolatedSearchOutcome
impl Debug for InterpolatedSearchOutcome
Source§impl Deref for InterpolatedSearchOutcome
impl Deref for InterpolatedSearchOutcome
Source§type Target = SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
type Target = SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
Source§impl From<InterpolatedSearchOutcome> for SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
impl From<InterpolatedSearchOutcome> for SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
Source§fn from(
outcome: InterpolatedSearchOutcome,
) -> SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
fn from( outcome: InterpolatedSearchOutcome, ) -> SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>
Source§impl From<SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>> for InterpolatedSearchOutcome
impl From<SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>> for InterpolatedSearchOutcome
Source§fn from(
outcome: SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>,
) -> InterpolatedSearchOutcome
fn from( outcome: SearchOutcome<InterpolatedPathOutcome, InterpolatedSearchStats>, ) -> InterpolatedSearchOutcome
impl StructuralPartialEq for InterpolatedSearchOutcome
Auto Trait Implementations§
impl Freeze for InterpolatedSearchOutcome
impl RefUnwindSafe for InterpolatedSearchOutcome
impl Send for InterpolatedSearchOutcome
impl Sync for InterpolatedSearchOutcome
impl Unpin for InterpolatedSearchOutcome
impl UnsafeUnpin for InterpolatedSearchOutcome
impl UnwindSafe for InterpolatedSearchOutcome
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
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> 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