pub struct CapabilityBuilder { /* private fields */ }
Expand description
A convenience builder for constructing [CapabilityDecl]s.
To use, call the constructor matching their capability type (CapabilityBuilder::protocol, CapabilityBuilder::directory, etc., and then call methods to set properties. When done, call CapabilityBuilder::build (or Into::into) to generate the [CapabilityDecl].
Implementations§
Source§impl CapabilityBuilder
impl CapabilityBuilder
pub fn protocol() -> Self
pub fn service() -> Self
pub fn directory() -> Self
pub fn storage() -> Self
pub fn runner() -> Self
pub fn resolver() -> Self
pub fn dictionary() -> Self
pub fn config() -> Self
pub fn name(self, name: &str) -> Self
pub fn path(self, path: &str) -> Self
pub fn rights(self, rights: Operations) -> Self
pub fn backing_dir(self, backing_dir: &str) -> Self
pub fn value(self, value: ConfigValue) -> Self
pub fn source(self, source: StorageDirectorySource) -> Self
pub fn subdir(self, subdir: &str) -> Self
pub fn storage_id(self, storage_id: StorageId) -> Self
pub fn delivery(self, delivery: DeliveryType) -> Self
pub fn build(self) -> CapabilityDecl
Trait Implementations§
Source§impl Debug for CapabilityBuilder
impl Debug for CapabilityBuilder
Source§impl From<CapabilityBuilder> for CapabilityDecl
impl From<CapabilityBuilder> for CapabilityDecl
Source§fn from(builder: CapabilityBuilder) -> Self
fn from(builder: CapabilityBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CapabilityBuilder
impl RefUnwindSafe for CapabilityBuilder
impl Send for CapabilityBuilder
impl Sync for CapabilityBuilder
impl Unpin for CapabilityBuilder
impl UnwindSafe for CapabilityBuilder
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