Skip to main content

AccountPersistence

Trait AccountPersistence 

Source
pub trait AccountPersistence: Send + Sync {
    // Required method
    fn persist(
        &self,
        previous: &AccountState,
        accepted: &AccountState,
    ) -> Result<()>;
}
Expand description

Persist an accepted account update before it becomes visible to other client operations. Implementations store data only: they must not call back into the client, perform network operations, or implement authentication/retry policy. A failed write leaves in-memory state unchanged and never retries a request.

Required Methods§

Source

fn persist( &self, previous: &AccountState, accepted: &AccountState, ) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§