pub struct RejectAllTransportOwnershipProof;Expand description
Reject-all placeholder used as the default for TransportServer impls that
haven’t been taught about ownership proofs yet (notably the wasm / TCP transports
during the V2 rollout). It cannot produce a proof and rejects every inbound proof
— safe by default: peers using this transport won’t be admitted to Kademlia via
V2, and we never accidentally accept somebody else’s proof we don’t understand.
Trait Implementations§
Source§impl TransportOwnershipProof for RejectAllTransportOwnershipProof
impl TransportOwnershipProof for RejectAllTransportOwnershipProof
Source§fn make_ownership_proof_payload(&self) -> Option<Bytes>
fn make_ownership_proof_payload(&self) -> Option<Bytes>
Announce-out: produce the proof bytes for our own announce. Returns
None if we
can’t currently prove ownership — e.g. an HTTPS server that hasn’t completed its
first ACME issuance yet. Callers (maintain_kademlia) treat None as “skip this
announce tick, try again next interval”. Read moreSource§fn prove(&self, _peer: &Peer, _proof_payload: &[u8], _now: TimeMillis) -> bool
fn prove(&self, _peer: &Peer, _proof_payload: &[u8], _now: TimeMillis) -> bool
Announce-in: validate
proof_payload (bytes pulled out of an inbound AnnounceV2)
against peer. Returns false if the bytes can’t be deserialised by this impl
(wrong transport / corrupt blob) or if the proof fails verification (expired cert,
wrong-IP SAN, …). Read moreAuto Trait Implementations§
impl Freeze for RejectAllTransportOwnershipProof
impl RefUnwindSafe for RejectAllTransportOwnershipProof
impl Send for RejectAllTransportOwnershipProof
impl Sync for RejectAllTransportOwnershipProof
impl Unpin for RejectAllTransportOwnershipProof
impl UnsafeUnpin for RejectAllTransportOwnershipProof
impl UnwindSafe for RejectAllTransportOwnershipProof
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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