Skip to main content

DetectorStore

Trait DetectorStore 

Source
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§

Source

fn to_bytes(&self) -> Result<Vec<u8>, DetectorStorageError>

Serializes this detector to a byte vector.

Source

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".

Implementors§