pub struct ApiClient(/* private fields */);Implementations§
Source§impl ApiClient
impl ApiClient
Sourcepub async fn nodes_seen(&self, ids: &[NodeId]) -> Result<()>
pub async fn nodes_seen(&self, ids: &[NodeId]) -> Result<()>
notify the node that we have just seen these nodes.
The impl should add these nodes to the routing table.
Sourcepub async fn nodes_dead(&self, ids: &[NodeId]) -> Result<()>
pub async fn nodes_dead(&self, ids: &[NodeId]) -> Result<()>
notify the node that we have tried to contact these nodes and have not gotten a response.
The impl can either clean these nodes from its routing table immediately or after a repeat offense.
pub async fn get_storage_stats( &self, ) -> Result<BTreeMap<Id, BTreeMap<Kind, usize>>>
pub async fn get_routing_table(&self) -> Result<Vec<Vec<NodeInfo>>>
pub async fn lookup( &self, id: Id, initial: Option<Vec<NodeId>>, ) -> Result<Vec<NodeId>>
pub async fn get_immutable(&self, hash: Hash) -> Result<Option<Vec<u8>>>
pub async fn put_immutable(&self, value: &[u8]) -> Result<(Hash, Vec<NodeId>)>
pub async fn self_lookup(&self)
pub async fn random_lookup(&self)
pub async fn candidate_lookup(&self)
pub fn downgrade(&self) -> WeakApiClient
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ApiClient
impl !UnwindSafe for ApiClient
impl Freeze for ApiClient
impl Send for ApiClient
impl Sync for ApiClient
impl Unpin for ApiClient
impl UnsafeUnpin for ApiClient
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