Trait SpecimenFile

Source
pub trait SpecimenFile {
    const MAGIC: &'static [&'static [u8]];

    // Required method
    fn type_name(&self) -> &'static str;
}
Expand description

Common functions for all file types parsed by MalwareDB

Required Associated Constants§

Source

const MAGIC: &'static [&'static [u8]]

Magic number, the bytes at the beginning of the file, which identify the file format Some file types have more than one possible magic number

Required Methods§

Source

fn type_name(&self) -> &'static str

Common name for a specific file type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl SpecimenFile for Office95<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for PDF<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for Rtf<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for Elf<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for FatMacho<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for Macho<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for EXE<'_>

Source§

const MAGIC: &'static [&'static [u8]]

Source§

impl SpecimenFile for Pef<'_>

Source§

const MAGIC: &'static [&'static [u8]]