pub struct Kernel {
pub state: FabricState,
pub generation: u32,
pub last_contact_generation: u32,
pub grant_live: bool,
pub grant_generation: u32,
pub direct_probe_count: u32,
pub selected: Option<PathClass>,
/* private fields */
}Fields§
§state: FabricState§generation: u32§last_contact_generation: u32§grant_live: bool§grant_generation: u32§direct_probe_count: u32§selected: Option<PathClass>Implementations§
Source§impl Kernel
impl Kernel
Sourcepub const fn intent(&self) -> Option<ConnectionIntent>
pub const fn intent(&self) -> Option<ConnectionIntent>
Kernel::intent.
Sourcepub fn admit(
&mut self,
intent: ConnectionIntent,
now_ms: u64,
) -> Result<(), FabricError>
pub fn admit( &mut self, intent: ConnectionIntent, now_ms: u64, ) -> Result<(), FabricError>
Admits a connection intent; FabricError on policy/capacity failure.
Sourcepub fn note_contact(&mut self, d: &ContactDescriptor)
pub fn note_contact(&mut self, d: &ContactDescriptor)
Records a learned contact descriptor.
Sourcepub fn step(&mut self, event: KernelEvent, now_ms: u64) -> KernelEffect
pub fn step(&mut self, event: KernelEvent, now_ms: u64) -> KernelEffect
Advances the state machine on event, returning its effect.
Sourcepub fn lease_still_usable(&self, lease: &RelayLease, now_ms: u64) -> bool
pub fn lease_still_usable(&self, lease: &RelayLease, now_ms: u64) -> bool
true when lease is within its window at now_ms.
Trait Implementations§
impl Copy for Kernel
impl Eq for Kernel
impl StructuralPartialEq for Kernel
Auto Trait Implementations§
impl Freeze for Kernel
impl RefUnwindSafe for Kernel
impl Send for Kernel
impl Sync for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernel
impl UnwindSafe for Kernel
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>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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> ⓘ
Converts
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> ⓘ
Converts
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