pub struct Client { /* private fields */ }
Expand description
Client to interact with an iroh node.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(rpc: RpcClient<RpcService>) -> Self
pub fn new(rpc: RpcClient<RpcService>) -> Self
Creates a new node client
Sourcepub async fn shutdown(&self, force: bool) -> Result<()>
pub async fn shutdown(&self, force: bool) -> Result<()>
Shuts down the node.
If force
is true, the node will be shut down instantly without
waiting for things to stop gracefully.
Sourcepub async fn stats(&self) -> Result<BTreeMap<String, CounterStats>>
pub async fn stats(&self) -> Result<BTreeMap<String, CounterStats>>
Fetches statistics of the running node.
Sourcepub async fn status(&self) -> Result<NodeStatus>
pub async fn status(&self) -> Result<NodeStatus>
Fetches status information about this node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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