pub enum RecordIngress {
Reject,
Memory {
hard_cap: usize,
limit: usize,
},
Store {
limit: usize,
},
Discard {
limit: usize,
},
}Expand description
How a connected host receives the next peer record, by the carrier’s current state. Checked once at the record’s start, when its canonical length is known and before any byte reaches memory, staging or the store.
Variants§
Reject
No record is legal in this state: PeerProtocol.
Memory
Establishment material, into memory. A canonical length over
hard_cap is PeerProtocol, one over limit LimitExceeded.
Store
A response to an outstanding request, through the store’s record
sink; one over limit, the round’s remaining transferred-record
budget, is LimitExceeded.
Discard
Validated to its item boundary and dropped, its length reported as
PeerInput::DiscardedRecord; one over limit is LimitExceeded.
Implementations§
Source§impl RecordIngress
impl RecordIngress
Sourcepub fn check_start(
self,
canonical_len: usize,
) -> Result<RecordDestination, MachineError>
pub fn check_start( self, canonical_len: usize, ) -> Result<RecordDestination, MachineError>
Check a peer record of canonical_len bytes at its start.
Trait Implementations§
Source§impl Clone for RecordIngress
impl Clone for RecordIngress
Source§fn clone(&self) -> RecordIngress
fn clone(&self) -> RecordIngress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RecordIngress
Source§impl Debug for RecordIngress
impl Debug for RecordIngress
impl Eq for RecordIngress
Source§impl PartialEq for RecordIngress
impl PartialEq for RecordIngress
Source§fn eq(&self, other: &RecordIngress) -> bool
fn eq(&self, other: &RecordIngress) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RecordIngress
Auto Trait Implementations§
impl Freeze for RecordIngress
impl RefUnwindSafe for RecordIngress
impl Send for RecordIngress
impl Sync for RecordIngress
impl Unpin for RecordIngress
impl UnsafeUnpin for RecordIngress
impl UnwindSafe for RecordIngress
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