pub struct IntentReservation { /* private fields */ }Expand description
IntentReservation
Declarative reservation attached to a call.
An intent expresses preconditions for executing a call, such as:
- how much of a resource is required (
quantity) - how long the reservation may remain pending (
ttl_secs) - optional concurrency caps (
max_in_flight)
Importantly:
- An intent is single-shot
- Failed intents are not reused
- Retrying requires creating a new intent
The reservation itself is enforced by the workflow layer.
Implementations§
Source§impl IntentReservation
impl IntentReservation
pub const fn new(key: IntentKey, quantity: u64) -> Self
pub const fn with_ttl_secs(self, ttl_secs: u64) -> Self
pub const fn with_max_in_flight(self, max_in_flight: u64) -> Self
Auto Trait Implementations§
impl Freeze for IntentReservation
impl RefUnwindSafe for IntentReservation
impl Send for IntentReservation
impl Sync for IntentReservation
impl Unpin for IntentReservation
impl UnwindSafe for IntentReservation
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