pub struct Builder { /* private fields */ }Expand description
The one composition point.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn with_modules(self, modules: Vec<ModuleDescriptor>) -> Self
pub fn with_modules(self, modules: Vec<ModuleDescriptor>) -> Self
Add the application’s modules, as compose_modules! produced them: their metadata
and every executable they compose.
Sourcepub fn with_builtin(self, executables: Vec<Executable>) -> Self
pub fn with_builtin(self, executables: Vec<Executable>) -> Self
Add executables without a module descriptor; each one’s module is the namespace of its id.
Sourcepub fn with_index(self, index: &Index) -> Self
pub fn with_index(self, index: &Index) -> Self
Every object of the index becomes a resource capability; the index’s fingerprint joins the registry’s.
Sourcepub fn build(self) -> Result<CapabilityRegistry, Vec<RegistryError>>
pub fn build(self) -> Result<CapabilityRegistry, Vec<RegistryError>>
Validate every invariant and build. Errors are collected, not stopped at the first, and reported in a deterministic order.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Builder
impl !UnwindSafe for Builder
impl Freeze for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
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