Trait openraft::AppData

source ·
pub trait AppData: Clone + Send + Sync + 'static + OptionalSerde { }
Expand description

A trait defining application specific data.

The intention of this trait is that applications which are using this crate will be able to use their own concrete data types throughout their application without having to serialize and deserialize their data as it goes through Raft. Instead, applications can present their data models as-is to Raft, Raft will present it to the application’s RaftStorage impl when ready, and the application may then deal with the data directly in the storage engine without having to do a preliminary deserialization.

Note

The trait is automatically implemented for all types which satisfy its supertraits.

Implementors§

source§

impl<T> AppData for Twhere T: Clone + Send + Sync + 'static + OptionalSerde,