pub struct HttpClient { /* private fields */ }Implementations§
Trait Implementations§
Source§impl DhtClient for HttpClient
impl DhtClient for HttpClient
Source§fn network_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn network_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NetworkInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns current network information for this node.
Source§fn peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Peer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current peers of this node.
Source§fn add_peers<'life0, 'async_trait>(
&'life0 self,
peers: Vec<Multiaddr>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_peers<'life0, 'async_trait>(
&'life0 self,
peers: Vec<Multiaddr>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Adds peers to connect to. Unless bootstrapping a network, at least one peer is needed.
Source§fn listen<'life0, 'async_trait>(
&'life0 self,
listening_address: Multiaddr,
) -> Pin<Box<dyn Future<Output = Result<Multiaddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn listen<'life0, 'async_trait>(
&'life0 self,
listening_address: Multiaddr,
) -> Pin<Box<dyn Future<Output = Result<Multiaddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts listening for connections on provided address.
Source§fn stop_listening<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_listening<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stops listening for connections.
Source§fn bootstrap<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bootstrap<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begins the bootstrap process on this node.
Source§fn address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Multiaddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Multiaddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the listening addresses of this node.
Source§fn get_record<'life0, 'life1, 'async_trait>(
&'life0 self,
identity: &'life1 Did,
) -> Pin<Box<dyn Future<Output = Result<Option<LinkRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_record<'life0, 'life1, 'async_trait>(
&'life0 self,
identity: &'life1 Did,
) -> Pin<Box<dyn Future<Output = Result<Option<LinkRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns an LinkRecord for the provided identity if found.
Source§fn put_record<'life0, 'async_trait>(
&'life0 self,
record: LinkRecord,
quorum: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_record<'life0, 'async_trait>(
&'life0 self,
record: LinkRecord,
quorum: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Propagates the corresponding managed sphere’s LinkRecord on nearby peers
in the DHT network.
Auto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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