From 909586e6ad6d1b9a04c564ec4373598983738a3e Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 29 May 2020 12:50:28 +0200 Subject: [PATCH] document MatchList Signed-off-by: Wolfgang Bumiller --- src/match_list.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/match_list.rs b/src/match_list.rs index 03c8124..7094205 100644 --- a/src/match_list.rs +++ b/src/match_list.rs @@ -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 { /// Check whether this list contains anything matching a prefix of the specified path, and the /// specified file mode.