Struct storage_service_client::StorageServiceClient [−][src]
pub struct StorageServiceClient { /* fields omitted */ }Expand description
The interface for sending Storage Service requests and querying network peer information.
Implementations
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>
Trait Implementations
type AppDataKey = ()
type AppDataKey = ()
The application specific key for AppData
Provides the PeerMetadataStorage for other functions. Not expected to be used externally.
Give a copy of the sender for the network
Application specific data interface
fn 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
fn 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
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self