pub struct Lots { /* private fields */ }Implementations§
Source§impl Lots
impl Lots
pub fn into_reference(val: Lots, env: Env) -> Result<Reference<Lots>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Lots>>
Source§impl Lots
impl Lots
Sourcepub async fn create(&self, input: CreateLotInput) -> Result<LotOutput>
pub async fn create(&self, input: CreateLotInput) -> Result<LotOutput>
Create a new lot
Sourcepub async fn get_by_number(
&self,
lot_number: String,
) -> Result<Option<LotOutput>>
pub async fn get_by_number( &self, lot_number: String, ) -> Result<Option<LotOutput>>
Get a lot by lot number
Sourcepub async fn get_active_lots(&self, sku: String) -> Result<Vec<LotOutput>>
pub async fn get_active_lots(&self, sku: String) -> Result<Vec<LotOutput>>
Get active lots for a SKU
Sourcepub async fn get_available_lots_for_sku(
&self,
sku: String,
) -> Result<Vec<LotOutput>>
pub async fn get_available_lots_for_sku( &self, sku: String, ) -> Result<Vec<LotOutput>>
Get available lots for a SKU (FIFO order)
Sourcepub async fn quarantine(&self, id: String, reason: String) -> Result<LotOutput>
pub async fn quarantine(&self, id: String, reason: String) -> Result<LotOutput>
Quarantine a lot
Sourcepub async fn release_quarantine(&self, id: String) -> Result<LotOutput>
pub async fn release_quarantine(&self, id: String) -> Result<LotOutput>
Release a lot from quarantine
Sourcepub async fn get_expiring_lots(&self, days: i32) -> Result<Vec<LotOutput>>
pub async fn get_expiring_lots(&self, days: i32) -> Result<Vec<LotOutput>>
Get expiring lots within days
Sourcepub async fn get_expired_lots(&self) -> Result<Vec<LotOutput>>
pub async fn get_expired_lots(&self) -> Result<Vec<LotOutput>>
Get expired lots
Sourcepub async fn get_quarantined(&self) -> Result<Vec<LotOutput>>
pub async fn get_quarantined(&self) -> Result<Vec<LotOutput>>
Get quarantined lots
Trait Implementations§
Source§impl FromNapiMutRef for Lots
impl FromNapiMutRef for Lots
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for Lots
impl FromNapiRef for Lots
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &Lots
impl FromNapiValue for &Lots
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut Lots
impl FromNapiValue for &mut Lots
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Lots
impl ToNapiValue for Lots
Source§unsafe fn to_napi_value(env: napi_env, val: Lots) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Lots) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Lots
impl ValidateNapiValue for &Lots
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut Lots
impl ValidateNapiValue for &mut Lots
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for Lots
impl !RefUnwindSafe for Lots
impl Send for Lots
impl Sync for Lots
impl Unpin for Lots
impl UnsafeUnpin for Lots
impl !UnwindSafe for Lots
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