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