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)
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, 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
State: RefUnwindSafe,
A: RefUnwindSafe,
<State as ResourceRowState>::StreamedOpenSlot: 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
State: UnsafeUnpin,
A: UnsafeUnpin,
<State as ResourceRowState>::StreamedOpenSlot: 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
State: UnwindSafe,
A: UnwindSafe + RefUnwindSafe,
<State as ResourceRowState>::StreamedOpenSlot: 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