match_string/
lib.rs

1pub mod base;
2pub mod dest;
3pub mod exts;
4
5// Re-exports to make core pattern types available at crate root for macro expansions
6pub use base::{Checkpoint, Or, Pattern, Sep, Sep1, To};
7pub use match_string_macros::matches;
8
9/// Internal helper used by the proc-macro to call the `Pattern::matches` method
10/// with the correct trait bounds so method resolution succeeds in macro expansions.
11pub fn __matches<'a, 's, P, Reference, R>(pat: &'a P, reference: &'s R) -> bool
12where
13    P: crate::base::Pattern<'a, Reference>,
14    R: crate::base::Iterable<'s, Iter = Reference> + 's,
15    Reference: crate::base::PeekableExt,
16    P::Dest: crate::base::Destination<Reference::Item>,
17    Reference::Item: crate::base::Satisfies<<P::Iter as Iterator>::Item>,
18{
19    <P as crate::base::Pattern<'a, Reference>>::matches(pat, reference)
20}