Skip to main content

DocumentBuilder

Struct DocumentBuilder 

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

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

Implementations§

Source§

impl<S: State> DocumentBuilder<S>

Source

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

Finish building and return the requested object

Source

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

Required.

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

Source

pub fn subject(self, value: DocumentSubject) -> DocumentBuilder<SetSubject<S>>
where S::Subject: IsUnset,

Required.

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

Source

pub fn classification( self, value: Classification, ) -> DocumentBuilder<SetClassification<S>>
where S::Classification: IsUnset,

Required.

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

Source

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

Required.

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

Source

pub fn uploaded_by_actor( self, value: ActorRef, ) -> DocumentBuilder<SetUploadedByActor<S>>
where S::UploadedByActor: IsUnset,

Required.

Source-backed uploaded by actor carried by this normalized pet-resort entity.

Source

pub fn uploaded_at( self, value: DateTime<Utc>, ) -> DocumentBuilder<SetUploadedAt<S>>
where S::UploadedAt: IsUnset,

Required.

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

Source

pub fn original_file( self, value: OriginalFile, ) -> DocumentBuilder<SetOriginalFile<S>>
where S::OriginalFile: IsUnset,

Required.

Source-backed original file carried by this normalized pet-resort entity.

Source

pub fn storage_ref(self, value: StorageRef) -> DocumentBuilder<SetStorageRef<S>>
where S::StorageRef: IsUnset,

Required.

Source-backed storage ref carried by this normalized pet-resort entity.

Source

pub fn virus_scan_status( self, value: VirusScanStatus, ) -> DocumentBuilder<SetVirusScanStatus<S>>
where S::VirusScanStatus: IsUnset,

Required.

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

Source

pub fn pii_redaction_status( self, value: PiiRedactionStatus, ) -> DocumentBuilder<SetPiiRedactionStatus<S>>
where S::PiiRedactionStatus: IsUnset,

Required.

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

Source

pub fn verification_status( self, value: Status, ) -> DocumentBuilder<SetVerificationStatus<S>>
where S::VerificationStatus: IsUnset,

Required.

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

Source

pub fn audit_refs(self, value: Vec<EventId>) -> DocumentBuilder<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>>, ) -> DocumentBuilder<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.