pub enum AddressBookError {
UnknownPeer(PeerId),
EmptyAddressList,
Full {
cap: usize,
},
AllocationFailed {
requested: usize,
},
}Expand description
Errors surfaced by AddressBook mutation methods.
Variants§
UnknownPeer(PeerId)
register_address / forget_address / drop_peer called
for a PeerId with no entry in the book.
EmptyAddressList
add_peer called with an empty address vector. An entry
with zero addresses can’t be looked up successfully, so
creating one is meaningless - reject up front.
Full
add_peer for a NEW peer when the book is already at its
configured cap. Adversarial peer-discovery floods can’t
grow the book without bound.
AllocationFailed
add_peer’s internal dedup buffer could not be reserved.
Vec::try_reserve_exact returned TryReserveError - the
host’s allocator has no headroom for requested addresses.
The engine maps this to WireReceiveErrorKind::AllocationFailed
so the receiver-side address-book hint is best-effort under
allocator pressure (the envelope still routes).
Trait Implementations§
Source§impl Clone for AddressBookError
impl Clone for AddressBookError
Source§fn clone(&self) -> AddressBookError
fn clone(&self) -> AddressBookError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AddressBookError
impl Debug for AddressBookError
Source§impl Display for AddressBookError
impl Display for AddressBookError
impl Eq for AddressBookError
Source§impl Error for AddressBookError
impl Error for AddressBookError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for AddressBookError
impl PartialEq for AddressBookError
Source§fn eq(&self, other: &AddressBookError) -> bool
fn eq(&self, other: &AddressBookError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AddressBookError
Auto Trait Implementations§
impl Freeze for AddressBookError
impl RefUnwindSafe for AddressBookError
impl Send for AddressBookError
impl Sync for AddressBookError
impl Unpin for AddressBookError
impl UnsafeUnpin for AddressBookError
impl UnwindSafe for AddressBookError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedComponent for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request