1pub use error::LogParseError;
3pub use parsed_log::ParsedLog;
4pub use raw_log::RawLog;
5pub use structured_log::{parsed::ParsedStructuredLog, raw::RawStructuredLog};
6
7pub mod error;
8pub mod parsed_log;
9pub mod raw_log;
10pub mod structured_log;
11
12pub type Result<T> = std::result::Result<T, LogParseError>;
13
14pub fn quick_pubkey_check(pubkey: &str) -> bool {
16 const MIN_CHARS: usize = 32;
17 const MAX_CHARS: usize = 44;
18
19 let bytes = pubkey.as_bytes();
21 let len = bytes.len();
22
23 #[allow(clippy::manual_range_contains)]
25 if len < MIN_CHARS || len > MAX_CHARS {
26 return false;
27 }
28
29 bytes.iter().all(|b| {
31 matches!(
32 b,
33 b'1'..=b'9' | b'A'..=b'H' | b'J'..=b'N' | b'P'..=b'Z' | b'a'..=b'k' | b'm'..=b'z'
34 )
35 })
36}