pub struct SourceScopedAddressLookup { /* private fields */ }Expand description
An in-process iroh address lookup whose records retain browse-source and DNS-SD service-instance identity.
Clone this value to register it with an endpoint. Create an
AddressLookupSource for every independent browse session.
Retiring a source removes it from all future AddressLookup::resolve
snapshots. Iroh 1.0.2 can separately retain paths it already consumed in
its private remote-path cache; that cache has no public invalidation API and
is cleared only with the endpoint itself.
Implementations§
Source§impl SourceScopedAddressLookup
impl SourceScopedAddressLookup
Sourcepub fn new(provenance: &'static str) -> Self
pub fn new(provenance: &'static str) -> Self
Creates an empty lookup. provenance is attached to every resolved item.
Sourcepub fn new_source(&self) -> AddressLookupSource
pub fn new_source(&self) -> AddressLookupSource
Creates an independent contribution namespace for one browse session.
Trait Implementations§
Source§impl AddressLookup for SourceScopedAddressLookup
impl AddressLookup for SourceScopedAddressLookup
Source§fn resolve(
&self,
endpoint_id: EndpointId,
) -> Option<BoxStream<'static, Result<Item, Error>>>
fn resolve( &self, endpoint_id: EndpointId, ) -> Option<BoxStream<'static, Result<Item, Error>>>
Source§fn publish(&self, _data: &EndpointData)
fn publish(&self, _data: &EndpointData)
Publishes the given
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for SourceScopedAddressLookup
impl Clone for SourceScopedAddressLookup
Source§fn clone(&self) -> SourceScopedAddressLookup
fn clone(&self) -> SourceScopedAddressLookup
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 SourceScopedAddressLookup
impl RefUnwindSafe for SourceScopedAddressLookup
impl Send for SourceScopedAddressLookup
impl Sync for SourceScopedAddressLookup
impl Unpin for SourceScopedAddressLookup
impl UnsafeUnpin for SourceScopedAddressLookup
impl UnwindSafe for SourceScopedAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
fn into_address_lookup( self, _endpoint: &Endpoint, ) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use
AddressLookup. Read moreSource§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