Skip to main content

PetBuilder

Struct PetBuilder 

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

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

Implementations§

Source§

impl<S: State> PetBuilder<S>

Source

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

Finish building and return the requested object

Source

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

Required.

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

Source

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

Required.

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

Source

pub fn name(self, value: Name) -> PetBuilder<SetName<S>>
where S::Name: IsUnset,

Required.

Contact or display name used by staff.

Source

pub fn species(self, value: Species) -> PetBuilder<SetSpecies<S>>
where S::Species: IsUnset,

Required.

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

Source

pub fn birth_date(self, value: NaiveDate) -> PetBuilder<SetBirthDate<S>>
where S::BirthDate: IsUnset,

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

Source

pub fn maybe_birth_date( self, value: Option<NaiveDate>, ) -> PetBuilder<SetBirthDate<S>>
where S::BirthDate: IsUnset,

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

Source

pub fn sex(self, value: Sex) -> PetBuilder<SetSex<S>>
where S::Sex: IsUnset,

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

Source

pub fn maybe_sex(self, value: Option<Sex>) -> PetBuilder<SetSex<S>>
where S::Sex: IsUnset,

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

Source

pub fn spay_neuter_status( self, value: SpayNeuterStatus, ) -> PetBuilder<SetSpayNeuterStatus<S>>
where S::SpayNeuterStatus: IsUnset,

Required.

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

Source

pub fn temperament( self, value: TemperamentProfile, ) -> PetBuilder<SetTemperament<S>>
where S::Temperament: IsUnset,

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

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

Source

pub fn maybe_temperament( self, value: Option<TemperamentProfile>, ) -> PetBuilder<SetTemperament<S>>
where S::Temperament: IsUnset,

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

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

Source

pub fn care_profile(self, value: CareProfile) -> PetBuilder<SetCareProfile<S>>
where S::CareProfile: IsUnset,

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

Source-backed care profile carried by this normalized pet-resort entity.

Source

pub fn maybe_care_profile( self, value: Option<CareProfile>, ) -> PetBuilder<SetCareProfile<S>>
where S::CareProfile: IsUnset,

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

Source-backed care profile carried by this normalized pet-resort entity.

Auto Trait Implementations§

§

impl<S> Freeze for PetBuilder<S>

§

impl<S> RefUnwindSafe for PetBuilder<S>

§

impl<S> Send for PetBuilder<S>

§

impl<S> Sync for PetBuilder<S>

§

impl<S> Unpin for PetBuilder<S>

§

impl<S> UnsafeUnpin for PetBuilder<S>

§

impl<S> UnwindSafe for PetBuilder<S>

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.