pub struct Hold {
pub frame: Waku,
pub provisions: Provisions,
pub bounds: Option<ExecutionBounds>,
}Expand description
What a run is held to: the frame it may reach the host through, the capabilities pure providers stand in for, and the bounds its project declares beside the process’s.
Fields§
§frame: Waku§provisions: Provisions§bounds: Option<ExecutionBounds>The project’s own bounds (bounds(...) in its Bluefile), met with
the process’s (Hold::execution_bounds), so they only narrow.
None runs under the process’s bounds alone.
Implementations§
Source§impl Hold
impl Hold
Sourcepub fn withheld(&self) -> Vec<Capability>
pub fn withheld(&self) -> Vec<Capability>
Every host capability neither the frame grants nor a whole-program provider stands in for. A scoped provider’s capability stays here: code outside its packages gets the frame’s answer.
Sourcepub fn granted(&self) -> Vec<Capability>
pub fn granted(&self) -> Vec<Capability>
Every host capability a call can reach the host through: granted by the frame, and no whole-program provider standing in for it. A scoped provider’s capability the frame grants is here: code outside its packages reaches the host.
Sourcepub fn withheld_host_names(&self) -> Vec<(&'static str, Capability)>
pub fn withheld_host_names(&self) -> Vec<(&'static str, Capability)>
Every host name neither the frame grants nor a whole-program provider stands in for. A scoped provider’s names stay here: code outside its packages gets the frame’s answer.
Sourcepub fn granted_host_names(&self) -> Vec<(&'static str, Capability)>
pub fn granted_host_names(&self) -> Vec<(&'static str, Capability)>
Every host name a call can reach the host through.
Sourcepub fn execution_bounds(&self) -> ExecutionBounds
pub fn execution_bounds(&self) -> ExecutionBounds
The bounds a run held here runs under: the process’s, met with the project’s.
Sourcepub fn frame_summary(&self, host_io: u64) -> Value
pub fn frame_summary(&self, host_io: u64) -> Value
The frame block of a receipt for a run held here that made host_io
host calls: exactly {"granted":[…],"withheld":[…],"host_io":n}.
Sourcepub fn bind<H: 'static>(
&self,
interp: &mut Interpreter<H>,
who: &'static str,
io: &HostIo,
)
pub fn bind<H: 'static>( &self, interp: &mut Interpreter<H>, who: &'static str, io: &HostIo, )
Bind the hold into interp: a breach for every withheld host name,
then each whole-program provider over its capability’s names and each
scoped one under provided_name, then a shim over every granted
host name that tallies each call into io. A withheld or provided
name gets no shim, so a pure frame tallies nothing. A whole-program
clock provider is also the clock the host’s Flash rate reads.
Sourcepub fn rebind_scoped(
&self,
program: &ResolvedProgram,
forms: &mut [Spanned],
) -> Vec<(&'static str, Capability)>
pub fn rebind_scoped( &self, program: &ResolvedProgram, forms: &mut [Spanned], ) -> Vec<(&'static str, Capability)>
Move each scoped provider’s host names, where a file of a package it
serves writes them in forms, onto provided_name. A provider
serves the packages its for: names and every package they use, by
the imports program resolved; forms is program’s evaluated tree,
top-level form for top-level form. Returns the host names the entry
file may not write: Hold::withheld_host_names less those a scoped
provider serves the entry’s own package.
Trait Implementations§
impl Eq for Hold
impl StructuralPartialEq for Hold
Auto Trait Implementations§
impl Freeze for Hold
impl RefUnwindSafe for Hold
impl Send for Hold
impl Sync for Hold
impl Unpin for Hold
impl UnsafeUnpin for Hold
impl UnwindSafe for Hold
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.