pub struct AddressLookupSource { /* private fields */ }Expand description
The contribution namespace owned by one browse session.
Implementations§
Source§impl AddressLookupSource
impl AddressLookupSource
Sourcepub fn retire(&self)
pub fn retire(&self)
Synchronously removes every contribution owned by this source.
Retirement is shared by all clones, is idempotent, and permanently rejects later updates. It is also performed automatically when the last source clone is dropped.
Sourcepub fn upsert(
&self,
instance_name: &str,
node_id: &str,
addrs: &[String],
) -> Result<AddressLookupUpsert, AddressLookupUpsertError>
pub fn upsert( &self, instance_name: &str, node_id: &str, addrs: &[String], ) -> Result<AddressLookupUpsert, AddressLookupUpsertError>
Inserts or replaces one DNS-SD service-instance contribution.
The returned snapshot lets adapters publish the new node’s full effective union and, when the instance changed identity, the old node’s transition before the new active event.
Sourcepub fn remove(&self, instance_name: &str) -> Option<String>
pub fn remove(&self, instance_name: &str) -> Option<String>
Removes this source’s contribution for instance_name.
The returned value is the removed record’s canonical lowercase-base32 node id. This lets an expiry event recover its peer identity even though DNS-SD removal callbacks carry only the service instance name.
Sourcepub fn remove_with_snapshot(
&self,
instance_name: &str,
) -> Option<AddressLookupRemoval>
pub fn remove_with_snapshot( &self, instance_name: &str, ) -> Option<AddressLookupRemoval>
Removes one instance and returns the node’s remaining effective snapshot atomically with that removal.
Trait Implementations§
Source§impl Clone for AddressLookupSource
impl Clone for AddressLookupSource
Source§fn clone(&self) -> AddressLookupSource
fn clone(&self) -> AddressLookupSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AddressLookupSource
impl RefUnwindSafe for AddressLookupSource
impl Send for AddressLookupSource
impl Sync for AddressLookupSource
impl Unpin for AddressLookupSource
impl UnsafeUnpin for AddressLookupSource
impl UnwindSafe for AddressLookupSource
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
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>
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