pub struct ChunkTable { /* private fields */ }Expand description
Fixed 32-slot pending-flight table. No heap; bodies are digest+length only.
Implementations§
Source§impl ChunkTable
impl ChunkTable
Sourcepub fn open(
&mut self,
locator: u64,
now_unix: u64,
ttl_secs: u64,
) -> Result<u8, CryptoError>
pub fn open( &mut self, locator: u64, now_unix: u64, ttl_secs: u64, ) -> Result<u8, CryptoError>
Open a pending flight. 33rd global → Capacity. 3rd for same locator → Capacity.
Sourcepub fn append(
&mut self,
flight: u8,
index: u8,
bytes: &[u8],
now_unix: u64,
) -> Result<(), CryptoError>
pub fn append( &mut self, flight: u8, index: u8, bytes: &[u8], now_unix: u64, ) -> Result<(), CryptoError>
Append one chunk’s exact bytes. Sum of lengths > 16 KiB → Capacity.
17th chunk → Capacity. Duplicate identical bytes → Replay (deadline unchanged).
Different bytes for the same index → Conflict. now_unix > expiry → Expired.
Auto Trait Implementations§
impl Freeze for ChunkTable
impl RefUnwindSafe for ChunkTable
impl Send for ChunkTable
impl Sync for ChunkTable
impl Unpin for ChunkTable
impl UnsafeUnpin for ChunkTable
impl UnwindSafe for ChunkTable
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<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> ⓘ
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