SpecimenFile

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 Malware DB

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<'_>

Available on crate feature office95 only.
Source§

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

Source§

impl SpecimenFile for PDF<'_>

Available on crate feature pdf only.
Source§

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

Source§

impl SpecimenFile for Rtf<'_>

Available on crate feature rtf only.
Source§

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

Source§

impl SpecimenFile for Elf<'_>

Available on crate feature elf only.
Source§

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

Source§

impl SpecimenFile for FatMacho<'_>

Available on crate feature macho only.
Source§

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

Source§

impl SpecimenFile for Macho<'_>

Available on crate feature macho only.
Source§

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

Source§

impl SpecimenFile for EXE<'_>

Available on crate feature pe32 only.
Source§

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

Source§

impl SpecimenFile for Pef<'_>

Available on crate feature pef only.
Source§

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