pub enum PeerControllerRequest {
GetKnownPeers {
responder: PeerControllerGetKnownPeersResponder,
},
GetPeerId {
payload: PeerControllerGetPeerIdRequest,
responder: PeerControllerGetPeerIdResponder,
},
SetDiscovery {
payload: PeerControllerSetDiscoveryRequest,
responder: PeerControllerSetDiscoveryResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: PeerControllerControlHandle,
method_type: MethodType,
},
}Variants§
GetKnownPeers
Get a list of discovered peers.
- error Returns
INTERNALif the operation failed (check logs).
Fields
§
responder: PeerControllerGetKnownPeersResponderGetPeerId
Get a peer’s ID from its address.
- error Returns
INTERNALif the operation failed (check logs). - error Returns
TIMEOUTif the operation timed out without finding the peer. - error Returns
MISSING_PARAMETERSifaddressis missing.
SetDiscovery
Set discovery state.
- error Returns
INTERNALif the operation failed (check logs). - error Returns
MISSING_PARAMETERSifdiscoveryis missing.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: PeerControllerControlHandle§
method_type: MethodTypeImplementations§
Source§impl PeerControllerRequest
impl PeerControllerRequest
pub fn into_get_known_peers( self, ) -> Option<PeerControllerGetKnownPeersResponder>
pub fn into_get_peer_id( self, ) -> Option<(PeerControllerGetPeerIdRequest, PeerControllerGetPeerIdResponder)>
pub fn into_set_discovery( self, ) -> Option<(PeerControllerSetDiscoveryRequest, PeerControllerSetDiscoveryResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PeerControllerRequest
impl !UnwindSafe for PeerControllerRequest
impl Freeze for PeerControllerRequest
impl Send for PeerControllerRequest
impl Sync for PeerControllerRequest
impl Unpin for PeerControllerRequest
impl UnsafeUnpin for PeerControllerRequest
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