Struct datacake_node::RpcNetwork
source · pub struct RpcNetwork { /* private fields */ }Expand description
A collection of RPC client connections which can be reused and multiplexed.
Implementations§
source§impl RpcNetwork
impl RpcNetwork
sourcepub fn get_or_connect(&self, addr: SocketAddr) -> Channel
pub fn get_or_connect(&self, addr: SocketAddr) -> Channel
Attempts to get an already existing connection or creates a new connection.
sourcepub fn connect(&self, addr: SocketAddr) -> Channel
pub fn connect(&self, addr: SocketAddr) -> Channel
Connects to a given address and adds it to the clients.
sourcepub fn disconnect(&self, addr: SocketAddr)
pub fn disconnect(&self, addr: SocketAddr)
Removes a client from the network.
Trait Implementations§
source§impl Clone for RpcNetwork
impl Clone for RpcNetwork
source§fn clone(&self) -> RpcNetwork
fn clone(&self) -> RpcNetwork
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Default for RpcNetwork
impl Default for RpcNetwork
source§fn default() -> RpcNetwork
fn default() -> RpcNetwork
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RpcNetwork
impl Send for RpcNetwork
impl Sync for RpcNetwork
impl Unpin for RpcNetwork
impl !UnwindSafe for RpcNetwork
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
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> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: *const T) -> Layout
fn layout_raw(_: *const T) -> Layout
Gets the layout of the type.