pub struct ProductVariant { /* private fields */ }Implementations§
Source§impl ProductVariant
impl ProductVariant
pub const fn new( id: VariantId, product_id: ProductId, sku: Sku, active: bool, ) -> Self
pub const fn try_new( id: VariantId, product_id: ProductId, sku: Sku, active: bool, ) -> Result<Self, ValidationError>
pub fn id(&self) -> <VariantId as FieldAccess>::Output<'_>
pub fn product_id(&self) -> <ProductId as FieldAccess>::Output<'_>
pub fn sku(&self) -> <Sku as FieldAccess>::Output<'_>
pub fn active(&self) -> <bool as FieldAccess>::Output<'_>
Trait Implementations§
Source§impl Clone for ProductVariant
impl Clone for ProductVariant
Source§fn clone(&self) -> ProductVariant
fn clone(&self) -> ProductVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProductVariant
impl Debug for ProductVariant
Source§impl PartialEq for ProductVariant
impl PartialEq for ProductVariant
Source§fn eq(&self, other: &ProductVariant) -> bool
fn eq(&self, other: &ProductVariant) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ProductVariant
impl StructuralPartialEq for ProductVariant
Auto Trait Implementations§
impl Freeze for ProductVariant
impl RefUnwindSafe for ProductVariant
impl Send for ProductVariant
impl Sync for ProductVariant
impl Unpin for ProductVariant
impl UnsafeUnpin for ProductVariant
impl UnwindSafe for ProductVariant
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