pub struct Inventory { /* private fields */ }Implementations§
Source§impl Inventory
impl Inventory
pub fn into_reference(val: Inventory, env: Env) -> Result<Reference<Inventory>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Inventory>>
Source§impl Inventory
impl Inventory
pub async fn create_item( &self, input: CreateInventoryItemInput, ) -> Result<InventoryItemOutput>
pub async fn get_stock(&self, sku: String) -> Result<Option<StockLevelOutput>>
pub async fn adjust( &self, sku: String, quantity: f64, reason: String, ) -> Result<()>
pub async fn reserve( &self, sku: String, quantity: f64, reference_type: String, reference_id: String, expires_in_seconds: Option<i64>, ) -> Result<ReservationOutput>
pub async fn confirm_reservation(&self, reservation_id: String) -> Result<()>
pub async fn release_reservation(&self, reservation_id: String) -> Result<()>
Trait Implementations§
Source§impl FromNapiMutRef for Inventory
impl FromNapiMutRef for Inventory
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 Inventory
impl FromNapiRef for Inventory
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 &Inventory
impl FromNapiValue for &Inventory
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 Inventory
impl FromNapiValue for &mut Inventory
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 Inventory
impl ToNapiValue for Inventory
Source§unsafe fn to_napi_value(env: napi_env, val: Inventory) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Inventory) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Inventory
impl ValidateNapiValue for &Inventory
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 Inventory
impl ValidateNapiValue for &mut Inventory
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 Inventory
impl !RefUnwindSafe for Inventory
impl Send for Inventory
impl Sync for Inventory
impl Unpin for Inventory
impl UnsafeUnpin for Inventory
impl !UnwindSafe for Inventory
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