Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

Registry

Struct Registry 

Source
pub struct Registry<const SLOTS: usize> { /* private fields */ }
Expand description

Small persistent allocation/publication registry. Keep it across title, gameplay and title re-admission so old handles cannot become current again.

Implementations§

Source§

impl<const SLOTS: usize> Registry<SLOTS>

Source

pub const fn new(pool: u8, capacity_bytes: u32) -> Self

Byte capacity of the existing arena, with at most SLOTS allocations.

Source

pub fn install( &mut self, arena: &mut CallerArena<'_>, words: &[u32], descriptor: Descriptor, ) -> Result<Handle, Error>

Install a completed, checked payload. Copy, relocation and I-cache synchronization all finish before the handle becomes admissible.

Source

pub fn admit<'a, 'buffer>( &'a mut self, arena: &'a mut CallerArena<'buffer>, dependencies: &'a [Handle], ) -> Result<Admission<'a, 'buffer, SLOTS>, Error>

Borrow the arena and registry until every CPU call/data view completes. All dependencies are checked before any admission is returned.

Source

pub fn unload(&mut self, handle: Handle) -> bool

Remove an allocation after external DMA/render users have completed. A live admission prevents this mutable registry access in safe Rust.

Source

pub fn invalidate_all(&mut self)

Quiescent phase handoff before gameplay overwrites title code storage. Persistent PagePool generations survive the next title re-admission.

Auto Trait Implementations§

§

impl<const SLOTS: usize> Freeze for Registry<SLOTS>

§

impl<const SLOTS: usize> RefUnwindSafe for Registry<SLOTS>

§

impl<const SLOTS: usize> Send for Registry<SLOTS>

§

impl<const SLOTS: usize> Sync for Registry<SLOTS>

§

impl<const SLOTS: usize> Unpin for Registry<SLOTS>

§

impl<const SLOTS: usize> UnsafeUnpin for Registry<SLOTS>

§

impl<const SLOTS: usize> UnwindSafe for Registry<SLOTS>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.