Skip to main content

QueryPreparedEnvelope

Trait QueryPreparedEnvelope 

Source
pub trait QueryPreparedEnvelope: ConnectionExt + Sized {
    // Provided methods
    fn prepared_envelopes(
        &self,
        intent_id: ID,
    ) -> Result<Option<Vec<u8>>, StorageError> { ... }
    fn compare_and_set_prepared_envelopes(
        &self,
        intent_id: ID,
        expected: Option<&[u8]>,
        replacement: Option<&[u8]>,
    ) -> Result<bool, StorageError> { ... }
}
Expand description

Exact attempt bytes kept across retries of one logical intent.

Provided Methods§

Source

fn prepared_envelopes( &self, intent_id: ID, ) -> Result<Option<Vec<u8>>, StorageError>

Read the persisted attempt. None means no attempt is currently prepared.

Source

fn compare_and_set_prepared_envelopes( &self, intent_id: ID, expected: Option<&[u8]>, replacement: Option<&[u8]>, ) -> Result<bool, StorageError>

Replace only the exact attempt the caller read under the state writer. Late publish replies must use this check before attaching receipt metadata.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§