1#![warn(missing_docs)]
2#![warn(clippy::pedantic)]
3#![forbid(unsafe_code)]
4#![allow(unknown_lints)]
15#![deny(unsafe_code)]
16#![cfg_attr(
17 not(test),
18 deny(
19 clippy::unwrap_used,
20 clippy::expect_used,
21 clippy::todo,
22 clippy::unimplemented,
23 clippy::panic
24 )
25)]
26#![allow(clippy::doc_markdown, clippy::module_name_repetitions)]
27#![allow(
28 clippy::cast_possible_truncation,
29 clippy::cast_sign_loss,
30 clippy::collapsible_if,
31 clippy::if_not_else,
32 clippy::manual_strip,
33 clippy::match_same_arms,
34 clippy::missing_errors_doc,
35 clippy::needless_continue,
36 clippy::needless_pass_by_value,
37 clippy::redundant_closure_for_method_calls,
38 clippy::single_char_pattern,
39 clippy::sliced_string_as_bytes,
40 clippy::too_many_lines,
41 clippy::unnecessary_wraps,
42 clippy::wrong_self_convention
43)]
44#![cfg_attr(
45 test,
46 allow(
47 clippy::manual_string_new,
48 clippy::needless_raw_string_hashes,
49 clippy::unwrap_used
50 )
51)]
52
53pub mod base64;
55pub(crate) mod bio;
56pub(crate) mod code;
57pub mod content_type;
59pub(crate) mod copyright;
60pub(crate) mod cve;
61pub mod detect;
63pub mod error;
65pub mod file;
67pub mod hex;
69pub mod ioc_expand;
71pub mod ioc_hash;
73pub mod json;
75pub mod perceptual;
77pub mod raw;
79pub mod regex;
81pub mod semantic;
83pub(crate) mod suricata;
84pub mod variants;
86#[cfg(feature = "yara")]
87pub mod yaml;
89pub mod yara_literals;
91
92pub use content_type::{ContentType, Language};
93pub use error::{Error, Result};
94pub use file::{decode_iwf_hashes, load_pattern_file};
95
96#[cfg(doctest)]
98#[doc = include_str!("../README.md")]
99struct ReadmeExamples;