Skip to main content

Registration

Struct Registration 

Source
pub struct Registration<'a> { /* private fields */ }
Expand description

A view’s registration, as the engine drives it (module docs).

Implementations§

Source§

impl<'a> Registration<'a>

Source

pub fn open( input: Staged<'a>, ids: &'a [&'a str], admit: Admit<'a>, ) -> Result<Self, Failure>

Step 2: the members’ ids checked first (in bytewise order, none repeated, X’s not among them; any other is internal, the caller’s fault, review round 3’s P4), then the stop, then X’s own open on M_X, and the private Environment, empty.

Source

pub fn stats(&self) -> EnvStats

Current private Environment figures, including a failed member call.

Source

pub fn own(&self) -> &Arc<BundleFile> ⓘ

X’s own handle, on M_X: step 3 reads its AssetBundle object.

Source

pub fn member( &mut self, m: &Staged<'a>, bits: &dyn PeekBits, loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>) -> Result<(), Failure> + '_), ) -> Result<(), Failure>

Step 4 for one member, after the stop check: its load (the next of the ids Self::open took; any other is internal), the loaded bundle handed to loaded (the name table), then its reach, its bits loaded from bits and dropped after. A failure the member makes is dependency_failed(<id>, <reason>).

Source

pub fn member_with_handle( &mut self, m: &Staged<'a>, bits: &dyn PeekBits, loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>, DependencyFile) -> Result<(), Failure> + '_), ) -> Result<(), Failure>

Register a member and pass its evictable handle to the caller.

Source

pub fn finish( self, bits: &dyn PeekBits, loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>) -> Result<(), Failure> + '_), ) -> Result<Registered, Failure>

X last, every member registered (else internal), after the stop check: its load from its own open’s bytes, the registered header and directory compared with the own handle’s (same_open), the bundle handed to loaded, then X’s reach.

Source

pub fn finish_with_handle( self, bits: &dyn PeekBits, loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>, DependencyFile) -> Result<(), Failure> + '_), ) -> Result<Registered, Failure>

Finish registration and pass the registered input’s evictable handle.

Auto Trait Implementations§

§

impl<'a> !Freeze for Registration<'a>

§

impl<'a> !RefUnwindSafe for Registration<'a>

§

impl<'a> !Send for Registration<'a>

§

impl<'a> !Sync for Registration<'a>

§

impl<'a> !UnwindSafe for Registration<'a>

§

impl<'a> Forget for Registration<'a>

§

impl<'a> Move for Registration<'a>

§

impl<'a> Unpin for Registration<'a>

§

impl<'a> UnsafeUnpin for Registration<'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 = !

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

fn try_from(value: U) -> Result<T, !>

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.