pub struct RepositoryPattern(/* private fields */);Expand description
One pattern over a normalized repository origin, host/owner/name, where a * segment
matches exactly one whole segment of the origin.
Kept as it was written, because that is how config show and every refusal spell it.
Implementations§
Source§impl RepositoryPattern
impl RepositoryPattern
Sourcepub fn new(pattern: impl Into<String>) -> Result<Self, String>
pub fn new(pattern: impl Into<String>) -> Result<Self, String>
One pattern, once it is established it is one.
§Errors
Returns why when the pattern is not itself spelled as a normalized origin — the
shape Repository holds every origin to, so a pattern no origin could match is
refused by the one rule that defines an origin rather than by a restatement of it —
or when a segment holds a * beside other characters.
Sourcepub fn matches(&self, origin: &Repository) -> bool
pub fn matches(&self, origin: &Repository) -> bool
Whether origin is one this pattern names.
Trait Implementations§
Source§impl Clone for RepositoryPattern
impl Clone for RepositoryPattern
Source§impl Debug for RepositoryPattern
impl Debug for RepositoryPattern
impl Eq for RepositoryPattern
Source§impl PartialEq for RepositoryPattern
impl PartialEq for RepositoryPattern
impl StructuralPartialEq for RepositoryPattern
Auto Trait Implementations§
impl Freeze for RepositoryPattern
impl RefUnwindSafe for RepositoryPattern
impl Send for RepositoryPattern
impl Sync for RepositoryPattern
impl Unpin for RepositoryPattern
impl UnsafeUnpin for RepositoryPattern
impl UnwindSafe for RepositoryPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.