pub struct DeliveryReducer;Expand description
Stateless durable-delivery reducer.
Implementations§
Source§impl DeliveryReducer
impl DeliveryReducer
Sourcepub fn claim(
intents: Vec<DeliveryIntentSnapshot>,
lease_id: String,
) -> Result<DeliveryClaim, SoftchatError>
pub fn claim( intents: Vec<DeliveryIntentSnapshot>, lease_id: String, ) -> Result<DeliveryClaim, SoftchatError>
Claim a bounded prefix of pending or retryable intents.
§Errors
Returns a stable delivery error for malformed rows, a reused lease, or a first payload that cannot fit the claim profile.
Sourcepub fn mark_socket_written(
claim: &DeliveryClaim,
intent_ids: Vec<String>,
) -> Result<Vec<DeliveryStateMutation>, SoftchatError>
pub fn mark_socket_written( claim: &DeliveryClaim, intent_ids: Vec<String>, ) -> Result<Vec<DeliveryStateMutation>, SoftchatError>
Mark an exact subset of one lease as socket-written.
§Errors
Returns a stable delivery error for stale leases, duplicate IDs, or rows that were not in the claimed state.
Sourcepub fn apply_relay_results(
claim: &DeliveryClaim,
results: Vec<RelayDeliveryResult>,
) -> Result<Vec<DeliveryStateMutation>, SoftchatError>
pub fn apply_relay_results( claim: &DeliveryClaim, results: Vec<RelayDeliveryResult>, ) -> Result<Vec<DeliveryStateMutation>, SoftchatError>
Apply stable per-intent relay outcomes after a socket write.
§Errors
Returns a stable delivery error for stale leases, duplicate/unknown IDs, invalid categories, or contradictory terminal transitions.
Sourcepub fn release_claim(
claim: &DeliveryClaim,
) -> Result<Vec<DeliveryStateMutation>, SoftchatError>
pub fn release_claim( claim: &DeliveryClaim, ) -> Result<Vec<DeliveryStateMutation>, SoftchatError>
Return every unfinished row in a lease to the retry queue.
§Errors
Returns a stable delivery error for an invalid claim.
Sourcepub fn operation_snapshot(
intents: Vec<DeliveryIntentSnapshot>,
) -> Result<OperationSnapshot, SoftchatError>
pub fn operation_snapshot( intents: Vec<DeliveryIntentSnapshot>, ) -> Result<OperationSnapshot, SoftchatError>
Derive one user-visible operation snapshot from durable intent rows.
§Errors
Returns a stable operation error for empty or mixed-operation input.
Trait Implementations§
Source§impl Clone for DeliveryReducer
impl Clone for DeliveryReducer
Source§fn clone(&self) -> DeliveryReducer
fn clone(&self) -> DeliveryReducer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeliveryReducer
impl Debug for DeliveryReducer
Source§impl Default for DeliveryReducer
impl Default for DeliveryReducer
Source§fn default() -> DeliveryReducer
fn default() -> DeliveryReducer
impl Copy for DeliveryReducer
Auto Trait Implementations§
impl Freeze for DeliveryReducer
impl RefUnwindSafe for DeliveryReducer
impl Send for DeliveryReducer
impl Sync for DeliveryReducer
impl Unpin for DeliveryReducer
impl UnsafeUnpin for DeliveryReducer
impl UnwindSafe for DeliveryReducer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more