pub struct DeliveryNoteItemBuilder { /* private fields */ }Expand description
Builder for DeliveryNoteItem entity
Provides a fluent API for constructing DeliveryNoteItem instances. System fields (id, metadata, timestamps) are auto-initialized.
Implementations§
Source§impl DeliveryNoteItemBuilder
impl DeliveryNoteItemBuilder
Sourcepub fn delivery_id(self, value: Uuid) -> Self
pub fn delivery_id(self, value: Uuid) -> Self
Set the delivery_id field (required)
Sourcepub fn valuation_rate(self, value: Decimal) -> Self
pub fn valuation_rate(self, value: Decimal) -> Self
Set the valuation_rate field (default: Decimal::from(0))
Sourcepub fn cogs_amount(self, value: Decimal) -> Self
pub fn cogs_amount(self, value: Decimal) -> Self
Set the cogs_amount field (default: Decimal::from(0))
Sourcepub fn build(self) -> Result<DeliveryNoteItem, String>
pub fn build(self) -> Result<DeliveryNoteItem, String>
Build the DeliveryNoteItem entity
Returns Err if any required field without a default is missing.
Trait Implementations§
Source§impl Clone for DeliveryNoteItemBuilder
impl Clone for DeliveryNoteItemBuilder
Source§impl Debug for DeliveryNoteItemBuilder
impl Debug for DeliveryNoteItemBuilder
Auto Trait Implementations§
impl Freeze for DeliveryNoteItemBuilder
impl RefUnwindSafe for DeliveryNoteItemBuilder
impl Send for DeliveryNoteItemBuilder
impl Sync for DeliveryNoteItemBuilder
impl Unpin for DeliveryNoteItemBuilder
impl UnsafeUnpin for DeliveryNoteItemBuilder
impl UnwindSafe for DeliveryNoteItemBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more