pub struct ModuleProvider {
pub drops: Vec<(u64, CapId)>,
pub calls: u64,
/* private fields */
}Expand description
A provider that serves domain operations on Infinity modules.
Fields§
§drops: Vec<(u64, CapId)>Drop notifications received (object id, capability).
calls: u64Calls served, for tests and diagnostics.
Implementations§
Source§impl ModuleProvider
impl ModuleProvider
pub fn new() -> Self
Sourcepub fn install(&mut self, module: InfinityModule) -> u64
pub fn install(&mut self, module: InfinityModule) -> u64
Install a module and return the object id to mint capabilities for.
Sourcepub fn module(&self, object: u64) -> Option<&InfinityModule>
pub fn module(&self, object: u64) -> Option<&InfinityModule>
Read a module back (tests and local callers).
Sourcepub fn module_count(&self) -> usize
pub fn module_count(&self) -> usize
Number of modules installed (including patch results).
Trait Implementations§
Source§impl Default for ModuleProvider
impl Default for ModuleProvider
Source§impl Provider for ModuleProvider
impl Provider for ModuleProvider
Source§fn mutating(&self, method: &str) -> bool
fn mutating(&self, method: &str) -> bool
Whether
method mutates provider state (refused on read-only caps).Source§fn on_drop(&mut self, object: u64, cap: CapId)
fn on_drop(&mut self, object: u64, cap: CapId)
Called when the last capability referencing
object is dropped.Source§fn take_drop_notifications(&mut self) -> Vec<(u64, CapId)>
fn take_drop_notifications(&mut self) -> Vec<(u64, CapId)>
Drain provider-side drop notifications recorded by
Provider::on_drop. Read moreSource§fn has_method(&self, method: &str) -> bool
fn has_method(&self, method: &str) -> bool
Whether this provider answers
method.Auto Trait Implementations§
impl Freeze for ModuleProvider
impl RefUnwindSafe for ModuleProvider
impl Send for ModuleProvider
impl Sync for ModuleProvider
impl Unpin for ModuleProvider
impl UnsafeUnpin for ModuleProvider
impl UnwindSafe for ModuleProvider
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
Mutably borrows from an owned value. Read more