pub struct NodeServiceClient(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl NodeServiceClient
impl NodeServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<NodeServiceRequest, NodeServiceResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<NodeServiceRequest, NodeServiceResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl NodeServiceClient
impl NodeServiceClient
pub fn get_node_rpc( &self, ctx: Context, ) -> impl Future<Output = Result<Node, RpcError>> + '_
pub fn get_predecessor_rpc( &self, ctx: Context, ) -> impl Future<Output = Result<Option<Node>, RpcError>> + '_
pub fn get_successor_rpc( &self, ctx: Context, ) -> impl Future<Output = Result<Node, RpcError>> + '_
pub fn get_successor_list_rpc( &self, ctx: Context, ) -> impl Future<Output = Result<Vec<Node>, RpcError>> + '_
pub fn find_successor_list_rpc( &self, ctx: Context, id: Digest, ) -> impl Future<Output = Result<Vec<Node>, RpcError>> + '_
pub fn find_predecessor_rpc( &self, ctx: Context, id: Digest, ) -> impl Future<Output = Result<Node, RpcError>> + '_
pub fn closest_preceding_finger_rpc( &self, ctx: Context, id: Digest, ) -> impl Future<Output = Result<Node, RpcError>> + '_
pub fn notify_rpc( &self, ctx: Context, node: Node, ) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn stabilize_rpc( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn get_local_rpc( &self, ctx: Context, key: Key, ) -> impl Future<Output = Result<Option<Value>, RpcError>> + '_
pub fn set_local_rpc( &self, ctx: Context, key: Key, value: Option<Value>, ) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn get_rpc( &self, ctx: Context, key: Key, ) -> impl Future<Output = Result<Option<Value>, RpcError>> + '_
pub fn set_rpc( &self, ctx: Context, key: Key, value: Option<Value>, ) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn replicate_rpc( &self, ctx: Context, key: Key, value: Option<Value>, ) -> impl Future<Output = Result<(), RpcError>> + '_
Trait Implementations§
Source§impl Clone for NodeServiceClient
impl Clone for NodeServiceClient
Source§fn clone(&self) -> NodeServiceClient
fn clone(&self) -> NodeServiceClient
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 NodeServiceClient
impl RefUnwindSafe for NodeServiceClient
impl Send for NodeServiceClient
impl Sync for NodeServiceClient
impl Unpin for NodeServiceClient
impl UnsafeUnpin for NodeServiceClient
impl UnwindSafe for NodeServiceClient
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