pub struct Products { /* private fields */ }Implementations§
Source§impl Products
impl Products
pub fn into_reference(val: Products, env: Env) -> Result<Reference<Products>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Products>>
Source§impl Products
impl Products
pub async fn create(&self, input: CreateProductInput) -> Result<ProductOutput>
pub async fn get(&self, id: String) -> Result<Option<ProductOutput>>
pub async fn get_variant_by_sku( &self, sku: String, ) -> Result<Option<ProductVariantOutput>>
pub async fn list(&self) -> Result<Vec<ProductOutput>>
pub async fn count(&self) -> Result<u32>
Trait Implementations§
Source§impl FromNapiMutRef for Products
impl FromNapiMutRef for Products
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 Products
impl FromNapiRef for Products
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 &Products
impl FromNapiValue for &Products
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 Products
impl FromNapiValue for &mut Products
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 Products
impl ToNapiValue for Products
Source§unsafe fn to_napi_value(env: napi_env, val: Products) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Products) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Products
impl ValidateNapiValue for &Products
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 Products
impl ValidateNapiValue for &mut Products
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 Products
impl !RefUnwindSafe for Products
impl Send for Products
impl Sync for Products
impl Unpin for Products
impl UnsafeUnpin for Products
impl !UnwindSafe for Products
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