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