pub struct HeapResourceTable<State>where
State: ResourceRowState,{ /* private fields */ }Expand description
Heap table for a std host: every active slot can hold the largest transfer the protocol allows (a sealed MAX_EFFICIENT_SIZE stream), and retired slot buffers are kept for reuse by later transfers.
Trait Implementations§
Source§impl<State> Debug for HeapResourceTable<State>
impl<State> Debug for HeapResourceTable<State>
Source§impl<State> Default for HeapResourceTable<State>
impl<State> Default for HeapResourceTable<State>
Source§fn default() -> HeapResourceTable<State>
fn default() -> HeapResourceTable<State>
Returns the “default value” for a type. Read more
Source§impl<State> ResourceTable<State> for HeapResourceTable<State>where
State: ResourceRowState + Default,
impl<State> ResourceTable<State> for HeapResourceTable<State>where
State: ResourceRowState + Default,
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)
fn push( &mut self, link_id: LinkId, hash: ResourceHash, state: State, ) -> Result<usize, ResourceTablePushError>
fn swap_remove(&mut self, index: usize)
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<State> Freeze for HeapResourceTable<State>
impl<State> RefUnwindSafe for HeapResourceTable<State>
impl<State> Send for HeapResourceTable<State>
impl<State> Sync for HeapResourceTable<State>
impl<State> Unpin for HeapResourceTable<State>
impl<State> UnsafeUnpin for HeapResourceTable<State>
impl<State> UnwindSafe for HeapResourceTable<State>
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