[−][src]Enum subset_map::LookupResult
The result of SubsetMap::lookup
.
It can either be a perfect match on the subset or a match where some elements of the input set had to be excluded.
A value of None
for the payload indicates
that there was a match for a given subset but
nevertheless there was no payload stored for
that subset.
Variants
The input set exactly matched a combination of the original set.
There were some elements in the input set that had to be excluded to match a subset of the original set
The excluded elements are returned.
There was no match at all for the given subset
Methods
impl<'a, E, P> LookupResult<'a, E, P>
[src]
pub fn payload(&self) -> Option<&P>
[src]
pub fn excluded_elements(&self) -> &[E]
[src]
Returns the excluded elements if there was a match at all.
If there was no match the returned slice is also empty.
pub fn is_perfect(&self) -> bool
[src]
Returns true
if there was a perfect match
pub fn is_excluded(&self) -> bool
[src]
Returns true
if there was a match
but some elements had to be excluded
pub fn is_no_match(&self) -> bool
[src]
Returns true
if there was no match at all
pub fn is_match(&self) -> bool
[src]
Returns true
if there was a match even
though some elements had to be excluded
Trait Implementations
impl<'a, E: Debug, P: Debug + 'a> Debug for LookupResult<'a, E, P>
[src]
Auto Trait Implementations
impl<'a, E, P> RefUnwindSafe for LookupResult<'a, E, P> where
E: RefUnwindSafe,
P: RefUnwindSafe,
E: RefUnwindSafe,
P: RefUnwindSafe,
impl<'a, E, P> Send for LookupResult<'a, E, P> where
E: Send,
P: Sync,
E: Send,
P: Sync,
impl<'a, E, P> Sync for LookupResult<'a, E, P> where
E: Sync,
P: Sync,
E: Sync,
P: Sync,
impl<'a, E, P> Unpin for LookupResult<'a, E, P> where
E: Unpin,
E: Unpin,
impl<'a, E, P> UnwindSafe for LookupResult<'a, E, P> where
E: UnwindSafe,
P: RefUnwindSafe,
E: UnwindSafe,
P: RefUnwindSafe,
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>,