nameme_core 0.2.3

Library to find the actual type of files based on their magic number.
1
2
3
4
5
6
7
8
9
10
11
12
13
use serde::{Deserialize, Serialize};

/// A signature. 
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Signature<'a> {
    pub description: &'a str,
    pub header: Vec<u8>,
    pub exts: Vec<&'a str>,
    pub class: &'a str,
    pub offset: usize,
    pub trailer: Vec<u8>,
}