pub struct LocalInstanceRegistry { /* private fields */ }Implementations§
Source§impl LocalInstanceRegistry
impl LocalInstanceRegistry
pub fn new( npub: impl Into<String>, discovery_scope: impl Into<String>, config: &LocalInstanceDiscoveryConfig, started_at_ms: u64, ) -> Result<Self, LocalInstanceRegistryError>
pub fn publish( &self, contacts: Vec<LocalInstanceContact>, now_ms: u64, ) -> Result<(), LocalInstanceRegistryError>
pub fn remove(&self) -> Result<(), LocalInstanceRegistryError>
pub fn scan( &self, now_ms: u64, stale_after_ms: u64, ) -> Result<Vec<LocalInstanceRecord>, LocalInstanceRegistryError>
Trait Implementations§
Source§impl Clone for LocalInstanceRegistry
impl Clone for LocalInstanceRegistry
Source§fn clone(&self) -> LocalInstanceRegistry
fn clone(&self) -> LocalInstanceRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalInstanceRegistry
impl RefUnwindSafe for LocalInstanceRegistry
impl Send for LocalInstanceRegistry
impl Sync for LocalInstanceRegistry
impl Unpin for LocalInstanceRegistry
impl UnsafeUnpin for LocalInstanceRegistry
impl UnwindSafe for LocalInstanceRegistry
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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