pub struct ComponentDeclBuilder { /* private fields */ }
Expand description
Builder for constructing a ComponentDecl.
Implementations§
Source§impl ComponentDeclBuilder
impl ComponentDeclBuilder
Sourcepub fn new_empty_component() -> Self
pub fn new_empty_component() -> Self
An empty ComponentDeclBuilder, with no program.
Sourcepub fn new() -> Self
pub fn new() -> Self
A ComponentDeclBuilder prefilled with a program and using a runner named “test_runner”, which we assume is offered to us.
Sourcepub fn child_default(self, name: &str) -> Self
pub fn child_default(self, name: &str) -> Self
Add a child with default properties.
pub fn collection(self, decl: impl Into<CollectionDecl>) -> Self
Sourcepub fn collection_default(self, name: &str) -> Self
pub fn collection_default(self, name: &str) -> Self
Add a collection with default properties.
Sourcepub fn program_runner(self, runner: &str) -> Self
pub fn program_runner(self, runner: &str) -> Self
Add a “program” clause, using the given runner.
pub fn program(self, program: ProgramDecl) -> Self
pub fn use_realm(self) -> Self
Sourcepub fn capability(self, capability: impl Into<CapabilityDecl>) -> Self
pub fn capability(self, capability: impl Into<CapabilityDecl>) -> Self
Add a capability declaration.
Sourcepub fn protocol_default(self, name: &str) -> Self
pub fn protocol_default(self, name: &str) -> Self
Add a default protocol declaration.
Sourcepub fn dictionary_default(self, name: &str) -> Self
pub fn dictionary_default(self, name: &str) -> Self
Add a default dictionary declaration.
Sourcepub fn runner_default(self, name: &str) -> Self
pub fn runner_default(self, name: &str) -> Self
Add a default runner declaration.
Sourcepub fn resolver_default(self, name: &str) -> Self
pub fn resolver_default(self, name: &str) -> Self
Add a default resolver declaration.
Sourcepub fn service_default(self, name: &str) -> Self
pub fn service_default(self, name: &str) -> Self
Add a default service declaration.
Sourcepub fn environment(self, environment: impl Into<EnvironmentDecl>) -> Self
pub fn environment(self, environment: impl Into<EnvironmentDecl>) -> Self
Add an environment declaration.
Trait Implementations§
Source§impl Clone for ComponentDeclBuilder
impl Clone for ComponentDeclBuilder
Source§fn clone(&self) -> ComponentDeclBuilder
fn clone(&self) -> ComponentDeclBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ComponentDeclBuilder
impl RefUnwindSafe for ComponentDeclBuilder
impl Send for ComponentDeclBuilder
impl Sync for ComponentDeclBuilder
impl Unpin for ComponentDeclBuilder
impl UnwindSafe for ComponentDeclBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)