pub trait DetectorStore: Serialize + for<'de> Deserialize<'de> {
// Provided methods
fn to_bytes(&self) -> Result<Vec<u8>, DetectorStorageError> { ... }
fn from_bytes(bytes: &[u8]) -> Result<Self, DetectorStorageError>
where Self: Sized { ... }
}Expand description
Trait for serializing and deserializing fitted detectors.
Provided Methods§
Sourcefn to_bytes(&self) -> Result<Vec<u8>, DetectorStorageError>
fn to_bytes(&self) -> Result<Vec<u8>, DetectorStorageError>
Serializes this detector to a byte vector.
Sourcefn from_bytes(bytes: &[u8]) -> Result<Self, DetectorStorageError>where
Self: Sized,
fn from_bytes(bytes: &[u8]) -> Result<Self, DetectorStorageError>where
Self: Sized,
Deserializes a detector from bytes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".