#![cfg_attr(
all(doc, feature = "document-features"),
doc = ::document_features::document_features!()
)]
#![cfg_attr(all(doc, feature = "document-features"), feature(doc_cfg, doc_auto_cfg))]
#![deny(missing_docs, rust_2018_idioms)]
#![forbid(unsafe_code)]
use bstr::BString;
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Pattern {
pub text: BString,
pub mode: pattern::Mode,
pub first_wildcard_pos: Option<usize>,
}
#[allow(clippy::empty_docs)]
pub mod pattern;
pub mod search;
#[allow(clippy::empty_docs)]
pub mod wildmatch;
pub use wildmatch::function::wildmatch;
mod parse;
pub fn parse(text: impl AsRef<[u8]>) -> Option<Pattern> {
Pattern::from_bytes(text.as_ref())
}