Trait StorageFamily
pub trait StorageFamily:
Clone
+ Debug
+ Sealed {
type String<'a>: AsRef<str> + Clone + Debug + Serialize
where Self: 'a;
type List<'a, T: Clone + Debug + Serialize + 'a>: AsRef<[T]> + Clone + Debug + Serialize
where Self: 'a;
type Value<'a>: Clone + Debug + Serialize
where Self: 'a;
}Expand description
A trait defining how data is stored in different contexts.
This trait allows the same protocol messages to be used with different storage strategies, see the main protocol module docs for more details on the strategies provided.
§Examples
use veecle_telemetry::protocol::base::StorageFamily;
use veecle_telemetry::protocol::transient::Transient;
// The Transient family uses references
let message: <Transient as StorageFamily>::String<'_> = "hello";Required Associated Types§
type String<'a>: AsRef<str> + Clone + Debug + Serialize
where
Self: 'a
type String<'a>: AsRef<str> + Clone + Debug + Serialize where Self: 'a
The string type for this storage family.
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.