pub struct OfferBuilder { /* private fields */ }
Expand description
A convenience builder for constructing [OfferDecl]s.
To use, call the constructor matching their capability type (OfferBuilder::protocol, OfferBuilder::directory, etc.), and then call methods to set properties. When done, call OfferBuilder::build (or Into::into) to generate the [OfferDecl].
Implementations§
Source§impl OfferBuilder
impl OfferBuilder
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 event_stream() -> Self
pub fn config() -> Self
pub fn name(self, name: &str) -> Self
pub fn target_name(self, name: &str) -> Self
pub fn from_dictionary(self, dictionary: &str) -> Self
pub fn source(self, source: OfferSource) -> Self
pub fn source_static_child(self, source: &str) -> Self
pub fn target(self, target: OfferTarget) -> Self
pub fn target_static_child(self, target: &str) -> Self
pub fn availability(self, availability: Availability) -> Self
pub fn dependency(self, dependency: DependencyType) -> Self
pub fn source_instance_filter<'a>( self, filter: impl IntoIterator<Item = &'a str>, ) -> Self
pub fn renamed_instances<'a, 'b>( self, mapping: impl IntoIterator<Item = (&'a str, &'b str)>, ) -> Self
pub fn rights(self, rights: Operations) -> Self
pub fn subdir(self, subdir: &str) -> Self
pub fn scope(self, scope: Vec<EventScope>) -> Self
pub fn build(self) -> OfferDecl
Trait Implementations§
Source§impl Debug for OfferBuilder
impl Debug for OfferBuilder
Source§impl From<OfferBuilder> for OfferDecl
impl From<OfferBuilder> for OfferDecl
Source§fn from(builder: OfferBuilder) -> Self
fn from(builder: OfferBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OfferBuilder
impl RefUnwindSafe for OfferBuilder
impl Send for OfferBuilder
impl Sync for OfferBuilder
impl Unpin for OfferBuilder
impl UnwindSafe for OfferBuilder
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