Skip to main content

ContractBuilder

Struct ContractBuilder 

Source
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>

Source

pub fn build(self) -> Contract
where S: IsComplete,

Finish building and return the requested object

Source

pub fn calendar(self, value: Policy) -> ContractBuilder<SetCalendar<S>>
where S::Calendar: IsUnset,

Required.

Source-derived calendar carried by this grooming contract.

Source

pub fn time_estimates( self, value: Vec<TimeEstimate>, ) -> ContractBuilder<SetTimeEstimates<S>>
where S::TimeEstimates: IsUnset,

Optional (Some / Option setters). Default: <Vec<breed_coat::TimeEstimate> as Default>::default().

Source-derived time estimates carried by this grooming contract.

Source

pub fn maybe_time_estimates( self, value: Option<Vec<TimeEstimate>>, ) -> ContractBuilder<SetTimeEstimates<S>>
where S::TimeEstimates: IsUnset,

Optional (Some / Option setters). Default: <Vec<breed_coat::TimeEstimate> as Default>::default().

Source-derived time estimates carried by this grooming contract.

Source

pub fn no_show(self, value: Rule) -> ContractBuilder<SetNoShow<S>>
where S::NoShow: IsUnset,

Required.

Source-derived no show carried by this grooming contract.

Source

pub fn rebooking(self, value: Cadence) -> ContractBuilder<SetRebooking<S>>
where S::Rebooking: IsUnset,

Required.

Source-derived rebooking carried by this grooming contract.

Source

pub fn reminders(self, value: Vec<Rule>) -> ContractBuilder<SetReminders<S>>
where S::Reminders: IsUnset,

Optional (Some / Option setters). Default: <Vec<reminder::Rule> as Default>::default().

Source-derived reminders carried by this grooming contract.

Source

pub fn maybe_reminders( self, value: Option<Vec<Rule>>, ) -> ContractBuilder<SetReminders<S>>
where S::Reminders: IsUnset,

Optional (Some / Option setters). Default: <Vec<reminder::Rule> as Default>::default().

Source-derived reminders carried by this grooming contract.

Source

pub fn history( self, value: HistoryRequirement, ) -> ContractBuilder<SetHistory<S>>
where S::History: IsUnset,

Required.

Source-derived history carried by this grooming contract.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.