pub struct TriggersService { /* private fields */ }Implementations§
Source§impl TriggersService
impl TriggersService
pub fn new(ctx: ServiceContext) -> Self
pub async fn list(&self, req: ListTriggersRequest) -> Result<TriggersList>
pub async fn list_with(&self, opts: ListTriggersOpts) -> Result<TriggersList>
pub async fn get(&self, req: GetTriggerRequest) -> Result<Option<Trigger>>
Sourcepub async fn get_by_id(
&self,
trigger_id: &str,
subaccount_id: Option<u64>,
) -> Result<Option<Trigger>>
pub async fn get_by_id( &self, trigger_id: &str, subaccount_id: Option<u64>, ) -> Result<Option<Trigger>>
Retrieve a trigger using the public string ID returned by create and list calls.
Sourcepub async fn create(
&self,
params: CreateTriggerParams,
) -> Result<TriggerMutationResult>
pub async fn create( &self, params: CreateTriggerParams, ) -> Result<TriggerMutationResult>
Create a trigger. Prices/qty must be Price / Quantity wrappers.
pub async fn cancel( &self, req: CancelTriggerRequest, ) -> Result<TriggerMutationResult>
Sourcepub async fn cancel_by_id(
&self,
trigger_id: &str,
subaccount_id: Option<u64>,
) -> Result<TriggerMutationResult>
pub async fn cancel_by_id( &self, trigger_id: &str, subaccount_id: Option<u64>, ) -> Result<TriggerMutationResult>
Cancel a trigger using the public string ID returned by create and list calls.
pub async fn pause( &self, req: PauseTriggerRequest, ) -> Result<TriggerMutationResult>
Sourcepub async fn pause_by_id(
&self,
trigger_id: &str,
subaccount_id: Option<u64>,
) -> Result<TriggerMutationResult>
pub async fn pause_by_id( &self, trigger_id: &str, subaccount_id: Option<u64>, ) -> Result<TriggerMutationResult>
Pause a trigger using the public string ID returned by create and list calls.
pub async fn resume( &self, req: ResumeTriggerRequest, ) -> Result<TriggerMutationResult>
Sourcepub async fn resume_by_id(
&self,
trigger_id: &str,
subaccount_id: Option<u64>,
) -> Result<TriggerMutationResult>
pub async fn resume_by_id( &self, trigger_id: &str, subaccount_id: Option<u64>, ) -> Result<TriggerMutationResult>
Resume a trigger using the public string ID returned by create and list calls.
Sourcepub async fn modify(
&self,
params: ModifyTriggerParams,
) -> Result<TriggerMutationResult>
pub async fn modify( &self, params: ModifyTriggerParams, ) -> Result<TriggerMutationResult>
Modify a trigger. Price fields must be Price wrappers.
pub async fn list_events( &self, req: ListTriggerEventsRequest, ) -> Result<TriggerEventsList>
Sourcepub async fn subscribe(
&self,
account_id: Option<&str>,
) -> Result<TypedSubscription<Trigger>>
pub async fn subscribe( &self, account_id: Option<&str>, ) -> Result<TypedSubscription<Trigger>>
Subscribe to private trigger updates (requires realtime feature).
Sourcepub async fn subscribe_events(
&self,
account_id: Option<&str>,
) -> Result<TypedSubscription<TriggerEvent>>
pub async fn subscribe_events( &self, account_id: Option<&str>, ) -> Result<TypedSubscription<TriggerEvent>>
Subscribe to private trigger events (requires realtime feature).
Trait Implementations§
Source§impl Clone for TriggersService
impl Clone for TriggersService
Source§fn clone(&self) -> TriggersService
fn clone(&self) -> TriggersService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for TriggersService
impl !RefUnwindSafe for TriggersService
impl !UnwindSafe for TriggersService
impl Send for TriggersService
impl Sync for TriggersService
impl Unpin for TriggersService
impl UnsafeUnpin for TriggersService
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