Skip to main content

alun_utils/
lib.rs

1//! 工具类:字符串、日期、脱敏、短ID、验证、Web解析、加密、XSS净化、UA解析
2
3pub mod str;
4pub mod date;
5pub mod mask;
6pub mod sid;
7pub mod serial;
8pub mod valid;
9pub mod web;
10pub mod crypto;
11pub mod export;
12pub mod ua;
13
14#[cfg(feature = "xss")]
15pub mod xss;
16
17pub use str::StrExt;
18pub use str::{
19    sanitize_filename, parse_json_value, format_file_size,
20    clean_string_param, clean_email, clean_password, InputCleaner,
21    generate_invite_code, generate_random_digits, generate_random_alphanum,
22};
23pub use date::Date;
24pub use mask::Mask;
25pub use sid::Sid;
26pub use valid::Valid;
27pub use web::WebExt;
28pub use web::extract_client_ip;
29pub use crypto::Crypto;
30pub use export::{Export, Import, ExportFormat};
31pub use ua::{parse_user_agent, UaInfo};
32pub use serial::{
33    SerialGenerator, SerialRule, SerialRecord, SerialError,
34    MemorySerialBackend, FormatEngine, CyclePeriod, IncrementStrategy,
35};