bitwarden_state/persist.rs
1use serde::{Serialize, de::DeserializeOwned};
2
3/// A value that can be persisted to SDK-managed storage.
4///
5/// This exists purely as a shorthand for the bounds every stored value must satisfy, so they
6/// don't have to be repeated at every use site. It carries no behavior and is implemented
7/// automatically for any type that meets them.
8pub trait Persist: Serialize + DeserializeOwned + Send + Sync + 'static {}
9
10impl<T: Serialize + DeserializeOwned + Send + Sync + 'static> Persist for T {}