pub enum InstanceSearchResult {
Found(Instance),
Ambiguous(Vec<Instance>),
NotFound,
}Expand description
Result of a type class search.
Variants§
Found(Instance)
A unique instance was found.
Ambiguous(Vec<Instance>)
Multiple instances matched (ambiguity).
NotFound
No instance was found.
Implementations§
Source§impl InstanceSearchResult
impl InstanceSearchResult
Sourcepub fn is_ambiguous(&self) -> bool
pub fn is_ambiguous(&self) -> bool
Returns true if the search was ambiguous.
Sourcepub fn into_instance(self) -> Option<Instance>
pub fn into_instance(self) -> Option<Instance>
Extract the unique instance, if any.
Trait Implementations§
Source§impl Clone for InstanceSearchResult
impl Clone for InstanceSearchResult
Source§fn clone(&self) -> InstanceSearchResult
fn clone(&self) -> InstanceSearchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InstanceSearchResult
impl RefUnwindSafe for InstanceSearchResult
impl Send for InstanceSearchResult
impl Sync for InstanceSearchResult
impl Unpin for InstanceSearchResult
impl UnsafeUnpin for InstanceSearchResult
impl UnwindSafe for InstanceSearchResult
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