pub struct ItemHit {
pub item_id: Uuid,
pub variant_id: Option<Uuid>,
pub item_code: String,
pub name: String,
pub barcode: Option<String>,
pub sku: Option<String>,
}Expand description
A scan resolved to a sellable identity: the item (always) plus the variant if the scanned code
matched a variant SKU/barcode rather than the base item. POS rings against item_id.
Returned by ItemRepository::find_by_scan_code and
crate::infrastructure::persistence::ItemVariantRepository::find_variant_by_scan_code.
Fields§
§item_id: Uuid§variant_id: Option<Uuid>§item_code: String§name: String§barcode: Option<String>§sku: Option<String>Trait Implementations§
Auto Trait Implementations§
impl Freeze for ItemHit
impl RefUnwindSafe for ItemHit
impl Send for ItemHit
impl Sync for ItemHit
impl Unpin for ItemHit
impl UnsafeUnpin for ItemHit
impl UnwindSafe for ItemHit
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