document MatchList

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-05-29 12:50:28 +02:00
parent 1d6ca6ca1b
commit 909586e6ad

View File

@ -325,6 +325,13 @@ impl MatchListEntry for &'_ MatchEntry {
} }
} }
/// This provides `matches` and `matches_exact` methods to lists of `MatchEntry`s.
///
/// Technically this is implemented for anything you can turn into a `DoubleEndedIterator` over
/// `MatchEntry` or `&MatchEntry`.
///
/// In practice this means you can use it with slices or references to `Vec` or `VecDeque` etc.
/// This makes it easier to use slices over entries or references to entries.
pub trait MatchList: Sized { pub trait MatchList: Sized {
/// Check whether this list contains anything matching a prefix of the specified path, and the /// Check whether this list contains anything matching a prefix of the specified path, and the
/// specified file mode. /// specified file mode.