pub struct Events { /* private fields */ }Implementations§
Source§impl Events
impl Events
pub fn into_reference(val: Events, env: Env) -> Result<Reference<Events>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Events>>
Source§impl Events
impl Events
Sourcepub async fn subscribe(&self) -> Result<CommerceEventSubscription>
pub async fn subscribe(&self) -> Result<CommerceEventSubscription>
Subscribe to all commerce events.
Sourcepub async fn subscribe_filtered(
&self,
event_types: Vec<String>,
) -> Result<CommerceEventSubscription>
pub async fn subscribe_filtered( &self, event_types: Vec<String>, ) -> Result<CommerceEventSubscription>
Subscribe to a subset of commerce events by event type.
Event types must match CommerceEvent::event_type() values (snake_case),
e.g. “order_created”, “inventory_adjusted”.
Sourcepub async fn list_webhooks(&self) -> Result<Vec<WebhookOutput>>
pub async fn list_webhooks(&self) -> Result<Vec<WebhookOutput>>
List registered webhooks.
Sourcepub async fn register_webhook(
&self,
input: CreateWebhookInput,
) -> Result<Option<String>>
pub async fn register_webhook( &self, input: CreateWebhookInput, ) -> Result<Option<String>>
Register a webhook endpoint for event delivery.
Sourcepub async fn unregister_webhook(&self, id: String) -> Result<bool>
pub async fn unregister_webhook(&self, id: String) -> Result<bool>
Unregister a webhook endpoint.
Trait Implementations§
Source§impl FromNapiMutRef for Events
impl FromNapiMutRef for Events
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 Events
impl FromNapiRef for Events
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 &Events
impl FromNapiValue for &Events
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 Events
impl FromNapiValue for &mut Events
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 Events
impl ToNapiValue for Events
Source§unsafe fn to_napi_value(env: napi_env, val: Events) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Events) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Events
impl ValidateNapiValue for &Events
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 Events
impl ValidateNapiValue for &mut Events
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 Events
impl !RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnsafeUnpin for Events
impl !UnwindSafe for Events
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