Skip to main content

FixedHeapResourceTable

Struct FixedHeapResourceTable 

Source
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>

Source§

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>
where State: ResourceRowState + Default, A: Allocator,

Source§

fn capacity(&self) -> usize

Source§

fn transfer_capacity(&self) -> usize

Source§

fn part_capacity(&self) -> usize

Source§

fn len(&self) -> usize

Source§

fn hashes(&self) -> &[ResourceHash]

Source§

fn timeout_ats(&self) -> &[Option<InstantMillis>]

Source§

fn states(&self) -> &[State]

Source§

fn set_hash(&mut self, index: usize, hash: ResourceHash)

Source§

fn set_timeout_at(&mut self, index: usize, timeout_at: Option<InstantMillis>)

Source§

fn state_mut(&mut self, index: usize) -> &mut State

Source§

fn transfer(&self, index: usize) -> &[u8]

Source§

fn part_names(&self, index: usize) -> &[[u8; 4]]

Source§

fn part_flags(&self, index: usize) -> &[bool]

Source§

fn streamed_open( &self, index: usize, ) -> &<State as ResourceRowState>::StreamedOpenSlot

Source§

fn buffers_mut(&mut self, index: usize) -> ResourceBuffers<'_>

Source§

fn transfer_and_streamed_open_mut( &mut self, index: usize, ) -> (&mut [u8], &mut <State as ResourceRowState>::StreamedOpenSlot)

Source§

fn push( &mut self, link_id: LinkId, hash: ResourceHash, state: State, ) -> Result<usize, ResourceTablePushError>

Source§

fn swap_remove(&mut self, index: usize)

Source§

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>
where State: Freeze, A: Freeze, <State as ResourceRowState>::StreamedOpenSlot: Freeze,

§

impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> RefUnwindSafe for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>

§

impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Send for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
where State: Send, A: Send, <State as ResourceRowState>::StreamedOpenSlot: Send,

§

impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Sync for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
where State: Sync, A: Sync, <State as ResourceRowState>::StreamedOpenSlot: Sync,

§

impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> Unpin for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>
where State: Unpin, <State as ResourceRowState>::StreamedOpenSlot: Unpin,

§

impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> UnsafeUnpin for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>

§

impl<State, const SLOTS: usize, const TRANSFER_BYTES: usize, const MAX_PARTS: usize, A> UnwindSafe for FixedHeapResourceTable<State, SLOTS, TRANSFER_BYTES, MAX_PARTS, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.