Skip to main content

DestinationIdentities

Struct DestinationIdentities 

Source
pub struct DestinationIdentities<Table, AppData> { /* private fields */ }

Implementations§

Source§

impl<Table, AppData> DestinationIdentities<Table, AppData>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn contains(&self, destination: &DestinationHash) -> bool

Source

pub fn get( &self, destination: &DestinationHash, ) -> Option<DestinationIdentity<'_>>

Source

pub fn expiry_at(&self, destination: &DestinationHash) -> Option<InstantMillis>

Source

pub fn rows(&self) -> impl Iterator<Item = DestinationIdentity<'_>>

Source

pub fn remember( &mut self, destination: DestinationHash, public_keys: IdentityPublicKeys, app_data: &[u8], announced_at: InstantMillis, ) -> Result<RememberDestinationIdentityOutcome, RememberDestinationIdentityError>

Source

pub fn restore( &mut self, destination: DestinationHash, public_keys: IdentityPublicKeys, app_data: &[u8], announced_at: InstantMillis, retention: DestinationIdentityRetentionState, ) -> Result<RememberDestinationIdentityOutcome, RememberDestinationIdentityError>

Source

pub fn mark_used( &mut self, destination: &DestinationHash, now: InstantMillis, ) -> MarkDestinationUsedOutcome

Source

pub fn retain( &mut self, destination: &DestinationHash, ) -> RetainDestinationOutcome

Source

pub fn release( &mut self, destination: &DestinationHash, now: InstantMillis, ) -> ReleaseDestinationOutcome

Source

pub fn retain_identity( &mut self, identity: &IdentityHash, ) -> RetainIdentityOutcome

Source

pub fn cull_expired( &mut self, now: InstantMillis, has_path: impl FnMut(&DestinationHash) -> bool, ) -> usize

Source

pub fn evict_oldest_unretained_without_path( &mut self, has_path: impl FnMut(&DestinationHash) -> bool, ) -> bool

Source

pub fn soonest_expiry( &self, has_path: impl FnMut(&DestinationHash) -> bool, ) -> Option<InstantMillis>

Trait Implementations§

Source§

impl<Table, AppData> Default for DestinationIdentities<Table, AppData>
where Table: Default, AppData: Default,

Source§

fn default() -> DestinationIdentities<Table, AppData>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<Table, AppData> Freeze for DestinationIdentities<Table, AppData>
where Table: Freeze, AppData: Freeze,

§

impl<Table, AppData> RefUnwindSafe for DestinationIdentities<Table, AppData>
where Table: RefUnwindSafe, AppData: RefUnwindSafe,

§

impl<Table, AppData> Send for DestinationIdentities<Table, AppData>
where Table: Send, AppData: Send,

§

impl<Table, AppData> Sync for DestinationIdentities<Table, AppData>
where Table: Sync, AppData: Sync,

§

impl<Table, AppData> Unpin for DestinationIdentities<Table, AppData>
where Table: Unpin, AppData: Unpin,

§

impl<Table, AppData> UnsafeUnpin for DestinationIdentities<Table, AppData>
where Table: UnsafeUnpin, AppData: UnsafeUnpin,

§

impl<Table, AppData> UnwindSafe for DestinationIdentities<Table, AppData>
where Table: UnwindSafe, AppData: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.