diff --git a/src/persistence.rs b/src/persistence.rs index 0027fe1..204b1c1 100644 --- a/src/persistence.rs +++ b/src/persistence.rs @@ -1,6 +1,10 @@ use std::error::Error; use std::fmt::Debug; +pub trait CloneNoPersistence: Sized { + fn clone_no_persistence(&self) -> Self; +} + #[derive(Debug, Display, Error)] #[display(inner)] pub struct PersistenceError(pub Box); @@ -37,7 +41,7 @@ impl Persistence { } } -pub trait Persisting: Sized { +pub trait Persisting: CloneNoPersistence { #[inline] fn load( provider: impl PersistenceProvider + 'static,