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>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: Freeze,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: Freeze,
Peerlist<<Z as NetworkZone>::Addr>: Freeze,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: Freeze,
Vec<BanState<<Z as NetworkZone>::Addr>>: Freeze,
Option<<Z as NetworkZone>::Addr>: Freeze,
impl<Z> RefUnwindSafe for AddressBookResponse<Z>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: RefUnwindSafe,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: RefUnwindSafe,
Peerlist<<Z as NetworkZone>::Addr>: RefUnwindSafe,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: RefUnwindSafe,
Vec<BanState<<Z as NetworkZone>::Addr>>: RefUnwindSafe,
Option<<Z as NetworkZone>::Addr>: RefUnwindSafe,
impl<Z> Send for AddressBookResponse<Z>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: Send,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: Send,
Peerlist<<Z as NetworkZone>::Addr>: Send,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: Send,
Vec<BanState<<Z as NetworkZone>::Addr>>: Send,
Option<<Z as NetworkZone>::Addr>: Send,
impl<Z> Sync for AddressBookResponse<Z>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: Sync,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: Sync,
Peerlist<<Z as NetworkZone>::Addr>: Sync,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: Sync,
Vec<BanState<<Z as NetworkZone>::Addr>>: Sync,
Option<<Z as NetworkZone>::Addr>: Sync,
impl<Z> Unpin for AddressBookResponse<Z>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: Unpin,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: Unpin,
Peerlist<<Z as NetworkZone>::Addr>: Unpin,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: Unpin,
Vec<BanState<<Z as NetworkZone>::Addr>>: Unpin,
Option<<Z as NetworkZone>::Addr>: Unpin,
impl<Z> UnsafeUnpin for AddressBookResponse<Z>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: UnsafeUnpin,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: UnsafeUnpin,
Peerlist<<Z as NetworkZone>::Addr>: UnsafeUnpin,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: UnsafeUnpin,
Vec<BanState<<Z as NetworkZone>::Addr>>: UnsafeUnpin,
Option<<Z as NetworkZone>::Addr>: UnsafeUnpin,
impl<Z> UnwindSafe for AddressBookResponse<Z>where
ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>: UnwindSafe,
Vec<ZoneSpecificPeerListEntryBase<<Z as NetworkZone>::Addr>>: UnwindSafe,
Peerlist<<Z as NetworkZone>::Addr>: UnwindSafe,
Vec<ConnectionInfo<<Z as NetworkZone>::Addr>>: UnwindSafe,
Vec<BanState<<Z as NetworkZone>::Addr>>: UnwindSafe,
Option<<Z as NetworkZone>::Addr>: UnwindSafe,
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.