Skip to main content

IncidentBuilder

Struct IncidentBuilder 

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

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

Implementations§

Source§

impl<S: State> IncidentBuilder<S>

Source

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

Finish building and return the requested object

Source

pub fn id(self, value: IncidentId) -> IncidentBuilder<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) -> IncidentBuilder<SetLocationId<S>>
where S::LocationId: IsUnset,

Required.

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

Source

pub fn primary_subject( self, value: IncidentSubject, ) -> IncidentBuilder<SetPrimarySubject<S>>
where S::PrimarySubject: IsUnset,

Required.

Source-backed primary subject carried by this normalized pet-resort entity.

Source

pub fn category(self, value: Category) -> IncidentBuilder<SetCategory<S>>
where S::Category: IsUnset,

Required.

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

Source

pub fn severity(self, value: Severity) -> IncidentBuilder<SetSeverity<S>>
where S::Severity: IsUnset,

Required.

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

Source

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

Required.

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

Source

pub fn reported_by(self, value: ActorRef) -> IncidentBuilder<SetReportedBy<S>>
where S::ReportedBy: IsUnset,

Required.

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

Source

pub fn reported_at( self, value: DateTime<Utc>, ) -> IncidentBuilder<SetReportedAt<S>>
where S::ReportedAt: IsUnset,

Required.

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

Source

pub fn summary(self, value: Summary) -> IncidentBuilder<SetSummary<S>>
where S::Summary: IsUnset,

Required.

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

Source

pub fn required_review_gates( self, value: Vec<ReviewGate>, ) -> IncidentBuilder<SetRequiredReviewGates<S>>
where S::RequiredReviewGates: IsUnset,

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

Source-backed required review gates carried by this normalized pet-resort entity.

Source

pub fn maybe_required_review_gates( self, value: Option<Vec<ReviewGate>>, ) -> IncidentBuilder<SetRequiredReviewGates<S>>
where S::RequiredReviewGates: IsUnset,

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

Source-backed required review gates carried by this normalized pet-resort entity.

Source

pub fn audit_refs(self, value: Vec<EventId>) -> IncidentBuilder<SetAuditRefs<S>>
where S::AuditRefs: IsUnset,

Optional (Some / Option setters). Default: <Vec<crate::audit::EventId> as Default>::default().

Source-backed audit refs carried by this normalized pet-resort entity.

Source

pub fn maybe_audit_refs( self, value: Option<Vec<EventId>>, ) -> IncidentBuilder<SetAuditRefs<S>>
where S::AuditRefs: IsUnset,

Optional (Some / Option setters). Default: <Vec<crate::audit::EventId> as Default>::default().

Source-backed audit refs 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.