pub struct PathTable { /* private fields */ }Expand description
Eight-slot table. Occupied entries are Racing, Active, or Losing.
Implementations§
Source§impl PathTable
impl PathTable
Sourcepub fn start_race(&mut self, generation: u64) -> Result<u8, QdnfError>
pub fn start_race(&mut self, generation: u64) -> Result<u8, QdnfError>
Open a Racing candidate. Occupied Racing+Active+Losing at
MAX_RACE_CANDIDATES → QdnfError::Capacity.
Sourcepub fn handle_of(&self, id: u8) -> Result<PathHandle, QdnfError>
pub fn handle_of(&self, id: u8) -> Result<PathHandle, QdnfError>
Path handle for id; error when absent.
Sourcepub fn attest_reachability(
&mut self,
handle: PathHandle,
) -> Result<(), QdnfError>
pub fn attest_reachability( &mut self, handle: PathHandle, ) -> Result<(), QdnfError>
Authenticated reachability proof already verified by the caller.
Mismatched generation → QdnfError::StaleGeneration.
Sourcepub fn mutate(
&mut self,
handle: PathHandle,
next: PathState,
) -> Result<PathHandle, QdnfError>
pub fn mutate( &mut self, handle: PathHandle, next: PathState, ) -> Result<PathHandle, QdnfError>
Transitions handle to next state; returns the new handle.
Sourcepub fn activate_generation(
&mut self,
id: u8,
generation: u64,
) -> Result<PathHandle, QdnfError>
pub fn activate_generation( &mut self, id: u8, generation: u64, ) -> Result<PathHandle, QdnfError>
Promote a Racing slot to Active by (slot_id, generation) equality (R04),
requiring attested reachability so stale slot IDs fail closed.
Sourcepub fn mark_active(&mut self, id: u8) -> Result<(), QdnfError>
pub fn mark_active(&mut self, id: u8) -> Result<(), QdnfError>
Promote a Racing slot to Active. A fourth Active is Capacity.
Sourcepub fn lose_and_cleanup(&mut self, id: u8) -> Result<(), QdnfError>
pub fn lose_and_cleanup(&mut self, id: u8) -> Result<(), QdnfError>
Losing/late attempts: Racing or Losing → Closed, slot freed. Active may be retired the same way so a later race can win.
Sourcepub fn lose_generation(
&mut self,
id: u8,
generation: u64,
) -> Result<(), QdnfError>
pub fn lose_generation( &mut self, id: u8, generation: u64, ) -> Result<(), QdnfError>
Same as Self::lose_and_cleanup, but the caller must present the
generation stored on the slot. Mismatch → QdnfError::StaleGeneration.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Active paths.
Sourcepub const fn preserve_operation_id_across_path_change() -> bool
pub const fn preserve_operation_id_across_path_change() -> bool
NET-05.05 partial: the application operation id is not the path id.
Sourcepub const fn duplicate_recovery_on_compat_carrier() -> bool
pub const fn duplicate_recovery_on_compat_carrier() -> bool
NET-05.11: reliable-carrier compatibility disables duplicate recovery.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathTable
impl RefUnwindSafe for PathTable
impl Send for PathTable
impl Sync for PathTable
impl Unpin for PathTable
impl UnsafeUnpin for PathTable
impl UnwindSafe for PathTable
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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