pub struct MalwareDatabase { /* private fields */ }Implementations§
Source§impl MalwareDatabase
impl MalwareDatabase
Sourcepub fn builtin() -> Result<Self, MalwareDbError>
pub fn builtin() -> Result<Self, MalwareDbError>
Load the built-in malware signatures database
Sourcepub fn from_file(path: &Path) -> Result<Self, MalwareDbError>
pub fn from_file(path: &Path) -> Result<Self, MalwareDbError>
Load malware signatures from a JSON file
Sourcepub fn from_json(json: &str) -> Result<Self, MalwareDbError>
pub fn from_json(json: &str) -> Result<Self, MalwareDbError>
Load malware signatures from a JSON string
Sourcepub fn updated_at(&self) -> &str
pub fn updated_at(&self) -> &str
Get the last update date
Sourcepub fn signature_count(&self) -> usize
pub fn signature_count(&self) -> usize
Get the number of signatures
Sourcepub fn add_signatures(
&mut self,
signatures: Vec<MalwareSignature>,
) -> Result<(), MalwareDbError>
pub fn add_signatures( &mut self, signatures: Vec<MalwareSignature>, ) -> Result<(), MalwareDbError>
Add additional signatures to the database
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MalwareDatabase
impl RefUnwindSafe for MalwareDatabase
impl Send for MalwareDatabase
impl Sync for MalwareDatabase
impl Unpin for MalwareDatabase
impl UnwindSafe for MalwareDatabase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more