pub struct FixedHeapResourceTable<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A = Global>where
State: ResourceRowState,
A: Allocator,{ /* private fields */ }Trait Implementations§
Source§impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Default for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Default for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
Source§fn default() -> FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
fn default() -> FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
Returns the “default value” for a type. Read more
Source§impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> ResourceTable<State> for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> ResourceTable<State> for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
fn capacity(&self) -> usize
fn transfer_capacity(&self) -> usize
fn part_capacity(&self) -> usize
fn len(&self) -> usize
fn link_ids(&self) -> &[LinkId]
fn hashes(&self) -> &[ResourceHash]
fn timeout_ats(&self) -> &[Option<InstantMillis>]
fn states(&self) -> &[State]
fn set_hash(&mut self, index: usize, hash: ResourceHash)
fn set_timeout_at(&mut self, index: usize, timeout_at: Option<InstantMillis>)
fn state_mut(&mut self, index: usize) -> &mut State
fn transfer(&self, index: usize) -> &[u8] ⓘ
fn part_names(&self, index: usize) -> &[[u8; 4]]
fn part_flags(&self, index: usize) -> &[bool]
fn streamed_open( &self, index: usize, ) -> &<State as ResourceRowState>::StreamedOpenSlot
fn buffers_mut(&mut self, index: usize) -> ResourceBuffers<'_>
fn transfer_and_streamed_open_mut( &mut self, index: usize, ) -> (&mut [u8], &mut <State as ResourceRowState>::StreamedOpenSlot)
Source§fn admission_for_shape(
&self,
shape: ResourceBufferShape,
) -> ResourceTableAdmission
fn admission_for_shape( &self, shape: ResourceBufferShape, ) -> ResourceTableAdmission
Classify a validated row shape without reserving it. The pending-offer
scheduler uses this to distinguish burst pressure from an offer that
can never fit this storage recipe.
fn push( &mut self, link_id: LinkId, hash: ResourceHash, state: State, shape: ResourceBufferShape, ) -> Result<usize, ResourceTablePushError>
fn swap_remove(&mut self, index: usize)
fn active_buffer_bytes(&self) -> usize
fn buffer_memory_limit(&self) -> usize
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Freeze for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> RefUnwindSafe for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>where
[LinkId; SLOTS]: RefUnwindSafe,
[ResourceHash; SLOTS]: RefUnwindSafe,
[Option<InstantMillis>; SLOTS]: RefUnwindSafe,
[State; SLOTS]: RefUnwindSafe,
Box<[Box<[u8], A>], A>: RefUnwindSafe,
Box<[[[u8; 4]; MAX_PARTS]], A>: RefUnwindSafe,
Box<[[bool; MAX_PARTS]], A>: RefUnwindSafe,
[<State as ResourceRowState>::StreamedOpenSlot; SLOTS]: RefUnwindSafe,
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Send for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Sync for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Unpin for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> UnsafeUnpin for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>where
[LinkId; SLOTS]: UnsafeUnpin,
[ResourceHash; SLOTS]: UnsafeUnpin,
[Option<InstantMillis>; SLOTS]: UnsafeUnpin,
[State; SLOTS]: UnsafeUnpin,
Box<[Box<[u8], A>], A>: UnsafeUnpin,
Box<[[[u8; 4]; MAX_PARTS]], A>: UnsafeUnpin,
Box<[[bool; MAX_PARTS]], A>: UnsafeUnpin,
[<State as ResourceRowState>::StreamedOpenSlot; SLOTS]: UnsafeUnpin,
impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> UnwindSafe for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>where
[LinkId; SLOTS]: UnwindSafe,
[ResourceHash; SLOTS]: UnwindSafe,
[Option<InstantMillis>; SLOTS]: UnwindSafe,
[State; SLOTS]: UnwindSafe,
Box<[Box<[u8], A>], A>: UnwindSafe,
Box<[[[u8; 4]; MAX_PARTS]], A>: UnwindSafe,
Box<[[bool; MAX_PARTS]], A>: UnwindSafe,
[<State as ResourceRowState>::StreamedOpenSlot; SLOTS]: UnwindSafe,
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