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 is_private(self, is_private: bool) -> Self
pub fn is_private(self, is_private: bool) -> Self
Set the is_private flag.
Sourcepub fn approximate_token_count(self, count: Option<u64>) -> Self
pub fn approximate_token_count(self, count: Option<u64>) -> Self
Set the approximate token count.
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more