pub struct StorageServiceClient { /* private fields */ }Expand description
The interface for sending Storage Service requests and querying network peer information.
Implementations
sourceimpl StorageServiceClient
impl StorageServiceClient
pub fn new(
network_sender: StorageServiceMultiSender,
peer_metadata: Arc<PeerMetadataStorage>
) -> Self
pub async fn send_request(
&self,
recipient: PeerNetworkId,
request: StorageServiceRequest,
timeout: Duration
) -> Result<StorageServiceResponse, Error>
pub fn get_peer_metadata_storage(&self) -> Arc<PeerMetadataStorage>
Trait Implementations
sourceimpl Clone for StorageServiceClient
impl Clone for StorageServiceClient
sourcefn clone(&self) -> StorageServiceClient
fn clone(&self) -> StorageServiceClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StorageServiceClient
impl Debug for StorageServiceClient
sourceimpl NetworkInterface<StorageServiceMessage, MultiNetworkSender<StorageServiceMessage, StorageServiceNetworkSender>> for StorageServiceClient
impl NetworkInterface<StorageServiceMessage, MultiNetworkSender<StorageServiceMessage, StorageServiceNetworkSender>> for StorageServiceClient
type AppDataKey = ()
type AppDataKey = ()
The application specific key for AppData
sourcefn peer_metadata_storage(&self) -> &PeerMetadataStorage
fn peer_metadata_storage(&self) -> &PeerMetadataStorage
Provides the PeerMetadataStorage for other functions. Not expected to be used externally.
sourcefn sender(&self) -> StorageServiceMultiSender
fn sender(&self) -> StorageServiceMultiSender
Give a copy of the sender for the network
sourcefn app_data(&self) -> &LockingHashMap<Self::AppDataKey, Self::AppData>
fn app_data(&self) -> &LockingHashMap<Self::AppDataKey, Self::AppData>
Application specific data interface
sourcefn connected_peers(
&self,
network_id: NetworkId
) -> HashMap<PeerNetworkId, PeerInfo, RandomState>
fn connected_peers(
&self,
network_id: NetworkId
) -> HashMap<PeerNetworkId, PeerInfo, RandomState>
Retrieve only connected peers
sourcefn filtered_peers<F>(
&self,
network_id: NetworkId,
filter: F
) -> HashMap<PeerNetworkId, PeerInfo, RandomState> where
F: FnMut(&(&AccountAddress, &PeerInfo)) -> bool,
fn filtered_peers<F>(
&self,
network_id: NetworkId,
filter: F
) -> HashMap<PeerNetworkId, PeerInfo, RandomState> where
F: FnMut(&(&AccountAddress, &PeerInfo)) -> bool,
Filter peers with according filter
sourcefn peers(
&self,
network_id: NetworkId
) -> HashMap<PeerNetworkId, PeerInfo, RandomState>
fn peers(
&self,
network_id: NetworkId
) -> HashMap<PeerNetworkId, PeerInfo, RandomState>
Retrieve PeerInfo for the node
Auto Trait Implementations
impl RefUnwindSafe for StorageServiceClient
impl Send for StorageServiceClient
impl Sync for StorageServiceClient
impl Unpin for StorageServiceClient
impl UnwindSafe for StorageServiceClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more