pub struct ContractBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> ContractBuilder<S>
impl<S: State> ContractBuilder<S>
Sourcepub fn build(self) -> Contractwhere
S: IsComplete,
pub fn build(self) -> Contractwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn program_duration(
self,
value: Duration,
) -> ContractBuilder<SetProgramDuration<S>>where
S::ProgramDuration: IsUnset,
pub fn program_duration(
self,
value: Duration,
) -> ContractBuilder<SetProgramDuration<S>>where
S::ProgramDuration: IsUnset,
Required.
Source-derived program duration carried by this training contract.
Sourcepub fn curriculum(self, value: Vec<Unit>) -> ContractBuilder<SetCurriculum<S>>where
S::Curriculum: IsUnset,
pub fn curriculum(self, value: Vec<Unit>) -> ContractBuilder<SetCurriculum<S>>where
S::Curriculum: IsUnset,
Sourcepub fn maybe_curriculum(
self,
value: Option<Vec<Unit>>,
) -> ContractBuilder<SetCurriculum<S>>where
S::Curriculum: IsUnset,
pub fn maybe_curriculum(
self,
value: Option<Vec<Unit>>,
) -> ContractBuilder<SetCurriculum<S>>where
S::Curriculum: IsUnset,
Sourcepub fn progress(
self,
value: ProgressTracking,
) -> ContractBuilder<SetProgress<S>>where
S::Progress: IsUnset,
pub fn progress(
self,
value: ProgressTracking,
) -> ContractBuilder<SetProgress<S>>where
S::Progress: IsUnset,
Required.
Source-derived progress carried by this training contract.
Sourcepub fn outcomes(self, value: Vec<Outcome>) -> ContractBuilder<SetOutcomes<S>>where
S::Outcomes: IsUnset,
pub fn outcomes(self, value: Vec<Outcome>) -> ContractBuilder<SetOutcomes<S>>where
S::Outcomes: IsUnset,
Sourcepub fn maybe_outcomes(
self,
value: Option<Vec<Outcome>>,
) -> ContractBuilder<SetOutcomes<S>>where
S::Outcomes: IsUnset,
pub fn maybe_outcomes(
self,
value: Option<Vec<Outcome>>,
) -> ContractBuilder<SetOutcomes<S>>where
S::Outcomes: IsUnset,
Sourcepub fn trainer_availability(
self,
value: Availability,
) -> ContractBuilder<SetTrainerAvailability<S>>where
S::TrainerAvailability: IsUnset,
pub fn trainer_availability(
self,
value: Availability,
) -> ContractBuilder<SetTrainerAvailability<S>>where
S::TrainerAvailability: IsUnset,
Required.
Source-derived trainer availability carried by this training contract.
Sourcepub fn package(self, value: Policy) -> ContractBuilder<SetPackage<S>>where
S::Package: IsUnset,
pub fn package(self, value: Policy) -> ContractBuilder<SetPackage<S>>where
S::Package: IsUnset,
Required.
Source-derived package carried by this training contract.
Sourcepub fn follow_up(
self,
value: FollowUpCadence,
) -> ContractBuilder<SetFollowUp<S>>where
S::FollowUp: IsUnset,
pub fn follow_up(
self,
value: FollowUpCadence,
) -> ContractBuilder<SetFollowUp<S>>where
S::FollowUp: IsUnset,
Required.
Source-derived follow up carried by this training contract.
Auto Trait Implementations§
impl<S> Freeze for ContractBuilder<S>
impl<S> RefUnwindSafe for ContractBuilder<S>
impl<S> Send for ContractBuilder<S>
impl<S> Sync for ContractBuilder<S>
impl<S> Unpin for ContractBuilder<S>
impl<S> UnsafeUnpin for ContractBuilder<S>
impl<S> UnwindSafe for ContractBuilder<S>
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