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>
impl<'a> Registration<'a>
Sourcepub fn open(
input: Staged<'a>,
ids: &'a [&'a str],
admit: Admit<'a>,
) -> Result<Self, Failure>
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.
Sourcepub fn stats(&self) -> EnvStats
pub fn stats(&self) -> EnvStats
Current private Environment figures, including a failed member call.
Sourcepub fn own(&self) -> &Arc<BundleFile> ⓘ
pub fn own(&self) -> &Arc<BundleFile> ⓘ
X’s own handle, on M_X: step 3 reads its AssetBundle object.
Sourcepub fn member(
&mut self,
m: &Staged<'a>,
bits: &dyn PeekBits,
loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>) -> Result<(), Failure> + '_),
) -> Result<(), Failure>
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>).
Sourcepub fn member_with_handle(
&mut self,
m: &Staged<'a>,
bits: &dyn PeekBits,
loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>, DependencyFile) -> Result<(), Failure> + '_),
) -> Result<(), Failure>
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.
Sourcepub fn finish(
self,
bits: &dyn PeekBits,
loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>) -> Result<(), Failure> + '_),
) -> Result<Registered, Failure>
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.
Sourcepub fn finish_with_handle(
self,
bits: &dyn PeekBits,
loaded: &mut (dyn FnMut(&str, &Arc<BundleFile>, DependencyFile) -> Result<(), Failure> + '_),
) -> Result<Registered, Failure>
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.