pub struct RunChargeOptions {
pub event_name: String,
pub count: Option<i64>,
pub idempotency_key: Option<String>,
}Expand description
Options for charging a pay-per-event run via RunClient::charge.
Fields§
§event_name: StringName of the event to charge for. Required.
count: Option<i64>Number of times to charge the event (defaults to 1).
idempotency_key: Option<String>Idempotency key deduplicating the charge across retries. The API requires this header
on every charge request and forgets each key 3 minutes after the charge, so a retry sent
past that window with the same key creates a new charge rather than being deduplicated.
If None, one is auto-generated as {runId}-{eventName}-{timestampMillis}-{random},
matching the reference client, so a transport-retried charge is applied at most once.
Trait Implementations§
Source§impl Clone for RunChargeOptions
impl Clone for RunChargeOptions
Source§impl Debug for RunChargeOptions
impl Debug for RunChargeOptions
Auto Trait Implementations§
impl Freeze for RunChargeOptions
impl RefUnwindSafe for RunChargeOptions
impl Send for RunChargeOptions
impl Sync for RunChargeOptions
impl Unpin for RunChargeOptions
impl UnsafeUnpin for RunChargeOptions
impl UnwindSafe for RunChargeOptions
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