Enum subset_map::LookupResult [] [src]

pub enum LookupResult<'a, E, P: 'a> {
    Perfect(Option<&'a P>),
    Excluded(Option<&'a P>, Vec<E>),
    NoMatch,
}

The result of SubsetMap::find.

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]

[src]

[src]

Returns the excluded elements if there was a match at all.

If there was no match the returned slice is also empty.

[src]

Returns true if there was a perfect match

[src]

Returns true if there was a match but some elements had to be excluded

[src]

Returns true if there was no match at all

[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]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a, E, P> Send for LookupResult<'a, E, P> where
    E: Send,
    P: Sync

impl<'a, E, P> Sync for LookupResult<'a, E, P> where
    E: Sync,
    P: Sync