pub struct LockedResourceBuilder { /* private fields */ }Expand description
Builder for creating LockedResource instances.
This builder helps address clippy warnings about functions with too many arguments by providing a fluent interface for constructing LockedResource instances.
Implementations§
Source§impl LockedResourceBuilder
impl LockedResourceBuilder
Sourcepub fn new(
name: String,
path: String,
checksum: String,
installed_at: String,
resource_type: ResourceType,
) -> Self
pub fn new( name: String, path: String, checksum: String, installed_at: String, resource_type: ResourceType, ) -> Self
Create a new builder with the required fields.
Sourcepub fn resolved_commit(self, resolved_commit: Option<String>) -> Self
pub fn resolved_commit(self, resolved_commit: Option<String>) -> Self
Set the resolved commit.
Sourcepub fn dependencies(self, dependencies: Vec<String>) -> Self
pub fn dependencies(self, dependencies: Vec<String>) -> Self
Set the dependencies.
Sourcepub fn manifest_alias(self, manifest_alias: Option<String>) -> Self
pub fn manifest_alias(self, manifest_alias: Option<String>) -> Self
Set the manifest alias.
Sourcepub fn applied_patches(self, applied_patches: BTreeMap<String, Value>) -> Self
pub fn applied_patches(self, applied_patches: BTreeMap<String, Value>) -> Self
Set the applied patches.
Sourcepub fn context_checksum(self, context_checksum: Option<String>) -> Self
pub fn context_checksum(self, context_checksum: Option<String>) -> Self
Set the context checksum.
Sourcepub fn variant_inputs(self, variant_inputs: VariantInputs) -> Self
pub fn variant_inputs(self, variant_inputs: VariantInputs) -> Self
Set the variant inputs.
Sourcepub fn build(self) -> LockedResource
pub fn build(self) -> LockedResource
Build the LockedResource.
Auto Trait Implementations§
impl Freeze for LockedResourceBuilder
impl RefUnwindSafe for LockedResourceBuilder
impl Send for LockedResourceBuilder
impl Sync for LockedResourceBuilder
impl Unpin for LockedResourceBuilder
impl UnwindSafe for LockedResourceBuilder
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