Struct sc_authority_discovery::Service
source · pub struct Service { /* private fields */ }
Expand description
Service to interact with the crate::Worker
.
Implementations§
source§impl Service
impl Service
A Service
allows to interact with a crate::Worker
, e.g. by querying the
crate::Worker
’s local address cache for a given [AuthorityId
].
Get the addresses for the given [AuthorityId
] from the local address
cache.
Returns None
if no entry was present or connection to the
crate::Worker
failed.
Note: [Multiaddr
]s returned always include a [PeerId
] via a
[libp2p::core::multiaddr::Protocol::P2p
] component. Equality of
[PeerId
]s across [Multiaddr
]s returned by a single call is not
enforced today, given that there are still authorities out there
publishing the addresses of their sentry nodes on the DHT. In the future
this guarantee can be provided.
Get the [AuthorityId
] for the given [PeerId
] from the local address
cache.
Returns None
if no entry was present or connection to the
crate::Worker
failed.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
Blanket Implementations§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
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, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.