pub struct UsageBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> UsageBuilder<S>
impl<S: State> UsageBuilder<S>
Sourcepub fn build(self) -> Usagewhere
S: IsComplete,
pub fn build(self) -> Usagewhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn input(self, value: Option<i32>) -> UsageBuilder<SetInput<S>>where
S::Input: IsUnset,
pub fn input(self, value: Option<i32>) -> UsageBuilder<SetInput<S>>where
S::Input: IsUnset,
Sourcepub fn maybe_input(
self,
value: Option<Option<i32>>,
) -> UsageBuilder<SetInput<S>>where
S::Input: IsUnset,
pub fn maybe_input(
self,
value: Option<Option<i32>>,
) -> UsageBuilder<SetInput<S>>where
S::Input: IsUnset,
Sourcepub fn output(self, value: Option<i32>) -> UsageBuilder<SetOutput<S>>where
S::Output: IsUnset,
pub fn output(self, value: Option<i32>) -> UsageBuilder<SetOutput<S>>where
S::Output: IsUnset,
Sourcepub fn maybe_output(
self,
value: Option<Option<i32>>,
) -> UsageBuilder<SetOutput<S>>where
S::Output: IsUnset,
pub fn maybe_output(
self,
value: Option<Option<i32>>,
) -> UsageBuilder<SetOutput<S>>where
S::Output: IsUnset,
Sourcepub fn total(self, value: Option<i32>) -> UsageBuilder<SetTotal<S>>where
S::Total: IsUnset,
pub fn total(self, value: Option<i32>) -> UsageBuilder<SetTotal<S>>where
S::Total: IsUnset,
Sourcepub fn maybe_total(
self,
value: Option<Option<i32>>,
) -> UsageBuilder<SetTotal<S>>where
S::Total: IsUnset,
pub fn maybe_total(
self,
value: Option<Option<i32>>,
) -> UsageBuilder<SetTotal<S>>where
S::Total: IsUnset,
Sourcepub fn unit(self, value: ModelUsageUnit) -> UsageBuilder<SetUnit<S>>where
S::Unit: IsUnset,
pub fn unit(self, value: ModelUsageUnit) -> UsageBuilder<SetUnit<S>>where
S::Unit: IsUnset,
Sourcepub fn maybe_unit(
self,
value: Option<ModelUsageUnit>,
) -> UsageBuilder<SetUnit<S>>where
S::Unit: IsUnset,
pub fn maybe_unit(
self,
value: Option<ModelUsageUnit>,
) -> UsageBuilder<SetUnit<S>>where
S::Unit: IsUnset,
Sourcepub fn input_cost(self, value: Option<f64>) -> UsageBuilder<SetInputCost<S>>where
S::InputCost: IsUnset,
pub fn input_cost(self, value: Option<f64>) -> UsageBuilder<SetInputCost<S>>where
S::InputCost: IsUnset,
Sourcepub fn maybe_input_cost(
self,
value: Option<Option<f64>>,
) -> UsageBuilder<SetInputCost<S>>where
S::InputCost: IsUnset,
pub fn maybe_input_cost(
self,
value: Option<Option<f64>>,
) -> UsageBuilder<SetInputCost<S>>where
S::InputCost: IsUnset,
Sourcepub fn output_cost(self, value: Option<f64>) -> UsageBuilder<SetOutputCost<S>>where
S::OutputCost: IsUnset,
pub fn output_cost(self, value: Option<f64>) -> UsageBuilder<SetOutputCost<S>>where
S::OutputCost: IsUnset,
Sourcepub fn maybe_output_cost(
self,
value: Option<Option<f64>>,
) -> UsageBuilder<SetOutputCost<S>>where
S::OutputCost: IsUnset,
pub fn maybe_output_cost(
self,
value: Option<Option<f64>>,
) -> UsageBuilder<SetOutputCost<S>>where
S::OutputCost: IsUnset,
Sourcepub fn total_cost(self, value: Option<f64>) -> UsageBuilder<SetTotalCost<S>>where
S::TotalCost: IsUnset,
pub fn total_cost(self, value: Option<f64>) -> UsageBuilder<SetTotalCost<S>>where
S::TotalCost: IsUnset,
Sourcepub fn maybe_total_cost(
self,
value: Option<Option<f64>>,
) -> UsageBuilder<SetTotalCost<S>>where
S::TotalCost: IsUnset,
pub fn maybe_total_cost(
self,
value: Option<Option<f64>>,
) -> UsageBuilder<SetTotalCost<S>>where
S::TotalCost: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for UsageBuilder<S>
impl<S> RefUnwindSafe for UsageBuilder<S>
impl<S> Send for UsageBuilder<S>
impl<S> Sync for UsageBuilder<S>
impl<S> Unpin for UsageBuilder<S>
impl<S> UnwindSafe for UsageBuilder<S>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more