pub enum AddressBookResponse<Z: NetworkZone> {
Ok,
Peer(ZoneSpecificPeerListEntryBase<Z::Addr>),
Peers(Vec<ZoneSpecificPeerListEntryBase<Z::Addr>>),
Peerlist(Peerlist<Z::Addr>),
PeerlistSize {
white: usize,
grey: usize,
},
ConnectionInfo(Vec<ConnectionInfo<Z::Addr>>),
ConnectionCount {
incoming: usize,
outgoing: usize,
},
GetBan {
unban_instant: Option<Instant>,
},
GetBans(Vec<BanState<Z::Addr>>),
OwnAddress(Option<Z::Addr>),
}Expand description
A response from the address book service.
Variants§
Ok
Generic OK response.
Response to:
Peer(ZoneSpecificPeerListEntryBase<Z::Addr>)
Response to:
Peers(Vec<ZoneSpecificPeerListEntryBase<Z::Addr>>)
Response to AddressBookRequest::GetWhitePeers.
Peerlist(Peerlist<Z::Addr>)
Response to AddressBookRequest::Peerlist.
PeerlistSize
Response to AddressBookRequest::PeerlistSize.
ConnectionInfo(Vec<ConnectionInfo<Z::Addr>>)
Response to AddressBookRequest::ConnectionInfo.
ConnectionCount
Response to AddressBookRequest::ConnectionCount.
GetBan
Response to AddressBookRequest::GetBan.
This returns None if the peer is not banned,
else it returns how long the peer is banned for.
GetBans(Vec<BanState<Z::Addr>>)
Response to AddressBookRequest::GetBans.
OwnAddress(Option<Z::Addr>)
Response to AddressBookRequest::OwnAddress
This returns None if the address book do
not contain a self designated address.
Auto Trait Implementations§
impl<Z> Freeze for AddressBookResponse<Z>
impl<Z> RefUnwindSafe for AddressBookResponse<Z>
impl<Z> Send for AddressBookResponse<Z>
impl<Z> Sync for AddressBookResponse<Z>
impl<Z> Unpin for AddressBookResponse<Z>
impl<Z> UnsafeUnpin for AddressBookResponse<Z>
impl<Z> UnwindSafe for AddressBookResponse<Z>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn 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>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.