Skip to main content

ReservationBuilder

Struct ReservationBuilder 

Source
pub struct ReservationBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> ReservationBuilder<S>

Source

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

Finish building and return the requested object

Source

pub fn id(self, value: Id) -> ReservationBuilder<SetId<S>>
where S::Id: IsUnset,

Required.

Source-backed id carried by this normalized pet-resort entity.

Source

pub fn location_id( self, value: LocationId, ) -> ReservationBuilder<SetLocationId<S>>
where S::LocationId: IsUnset,

Required.

Source-backed location ID carried by this normalized pet-resort entity.

Source

pub fn customer_id( self, value: CustomerId, ) -> ReservationBuilder<SetCustomerId<S>>
where S::CustomerId: IsUnset,

Required.

Source-backed customer ID carried by this normalized pet-resort entity.

Source

pub fn pet_ids(self, value: Vec<PetId>) -> ReservationBuilder<SetPetIds<S>>
where S::PetIds: IsUnset,

Required.

Source-backed pet IDs carried by this normalized pet-resort entity.

Source

pub fn service(self, value: ServiceKind) -> ReservationBuilder<SetService<S>>
where S::Service: IsUnset,

Required.

Requested service that drives scheduling and labor estimates.

Source

pub fn status(self, value: Status) -> ReservationBuilder<SetStatus<S>>
where S::Status: IsUnset,

Required.

Source-backed status carried by this normalized pet-resort entity.

Source

pub fn starts_at( self, value: DateTime<Utc>, ) -> ReservationBuilder<SetStartsAt<S>>
where S::StartsAt: IsUnset,

Required.

Source-backed starts at carried by this normalized pet-resort entity.

Source

pub fn ends_at(self, value: DateTime<Utc>) -> ReservationBuilder<SetEndsAt<S>>
where S::EndsAt: IsUnset,

Required.

Source-backed ends at carried by this normalized pet-resort entity.

Source

pub fn deposit(self, value: Deposit) -> ReservationBuilder<SetDeposit<S>>
where S::Deposit: IsUnset,

Optional (Some / Option setters). Source-backed deposit carried by this normalized pet-resort entity.

Source

pub fn maybe_deposit( self, value: Option<Deposit>, ) -> ReservationBuilder<SetDeposit<S>>
where S::Deposit: IsUnset,

Optional (Some / Option setters). Source-backed deposit carried by this normalized pet-resort entity.

Source

pub fn source(self, value: Source) -> ReservationBuilder<SetSource<S>>
where S::Source: IsUnset,

Required.

Source-backed source carried by this normalized pet-resort entity.

Source

pub fn requested_add_ons( self, value: Vec<AddOn>, ) -> ReservationBuilder<SetRequestedAddOns<S>>
where S::RequestedAddOns: IsUnset,

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

Source-backed requested add ons carried by this normalized pet-resort entity.

Source

pub fn maybe_requested_add_ons( self, value: Option<Vec<AddOn>>, ) -> ReservationBuilder<SetRequestedAddOns<S>>
where S::RequestedAddOns: IsUnset,

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

Source-backed requested add ons carried by this normalized pet-resort entity.

Source

pub fn hard_stops( self, value: Vec<HardStop>, ) -> ReservationBuilder<SetHardStops<S>>
where S::HardStops: IsUnset,

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

Source-backed hard stops carried by this normalized pet-resort entity.

Source

pub fn maybe_hard_stops( self, value: Option<Vec<HardStop>>, ) -> ReservationBuilder<SetHardStops<S>>
where S::HardStops: IsUnset,

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

Source-backed hard stops carried by this normalized pet-resort entity.

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.