[−][src]Struct sonnerie::wildcard::Wildcard
matches % as a wildcard operator
Implementations
impl Wildcard
[src]
pub fn new(w: &str) -> Wildcard
[src]
Parse a wildcard filter. All strings are valid, so never fails.
pub fn prefix(&self) -> &str
[src]
Returns the shortest possible fixed prefix.
If no "%" is in the filter, then the entire string is returned, Otherwise everything up to the "%" is returned, which may be an empty string.
pub fn is_exact(&self) -> bool
[src]
returns true if this search can only match a single key.
This only happens when there is no "%" in the filter.
pub fn as_regex(&self) -> Option<Regex>
[src]
Returns the regex that matches my wildcard.
Returns None if the prefix is all that's needed, even if it's still a wildcard.
"prefix%suffix" returns Some
but prefix%
returns
None
.
Auto Trait Implementations
impl RefUnwindSafe for Wildcard
impl Send for Wildcard
impl Sync for Wildcard
impl Unpin for Wildcard
impl UnwindSafe for Wildcard
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,