pub struct PeerProfile {
pub limits: ReceiveLimits,
pub registry_epoch: u64,
pub features: u32,
}Expand description
A peer’s PUBLISHED acceptance surface — the single declarative object it EXPOSES to the other side
AND that its own decoder ENFORCES. Declare it once: it is both advertised (in the handshake) and the
budget the decode path checks, so the two can never drift. Carries the resource budget
(ReceiveLimits), the peer’s type-registry epoch (a content hash of its type table — when both
peers’ epochs match, struct/enum NAMES need not travel, since both derive the same ids), and a
feature bitset (FEAT_*).
Fields§
§limits: ReceiveLimitsWhat this peer will accept — enforced on decode, advertised so a cooperative sender stays within it.
registry_epoch: u64Content hash of this peer’s type table (0 = none). Equal non-zero epochs on both sides unlock name elision.
features: u32FEAT_* capability bits this peer understands.
Implementations§
Source§impl PeerProfile
impl PeerProfile
Sourcepub const fn conservative() -> Self
pub const fn conservative() -> Self
The profile to ASSUME for a peer we have NOT yet heard from — NO optional capabilities and NO
shared type registry. Negotiating against it yields a plain, uncompressed, self-describing send
that ANY receiver (even a non-Logos relay consumer) can decode. A capability turns on only once
the peer ADVERTISES it in its handshake. (Default is the opposite — the FULL profile a Logos
node advertises for ITSELF.)
Trait Implementations§
Source§impl Clone for PeerProfile
impl Clone for PeerProfile
Source§fn clone(&self) -> PeerProfile
fn clone(&self) -> PeerProfile
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 PeerProfile
impl Debug for PeerProfile
Source§impl Default for PeerProfile
impl Default for PeerProfile
Source§impl PartialEq for PeerProfile
impl PartialEq for PeerProfile
Source§fn eq(&self, other: &PeerProfile) -> bool
fn eq(&self, other: &PeerProfile) -> bool
self and other values to be equal, and is used by ==.impl Copy for PeerProfile
impl Eq for PeerProfile
impl StructuralPartialEq for PeerProfile
Auto Trait Implementations§
impl Freeze for PeerProfile
impl RefUnwindSafe for PeerProfile
impl Send for PeerProfile
impl Sync for PeerProfile
impl Unpin for PeerProfile
impl UnsafeUnpin for PeerProfile
impl UnwindSafe for PeerProfile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.