#[non_exhaustive]pub enum KeyResult<'a> {
Unambiguous {
shape: &'static Shape,
},
Ambiguous {
fields: Vec<(&'a FieldInfo, u64)>,
},
Solved(ResolutionHandle<'a>),
Unknown,
}Expand description
Result of reporting a key to the solver.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unambiguous
All candidates have the same type for this key. The deserializer can parse the value directly.
Ambiguous
Candidates have different types for this key - need disambiguation.
Deserializer should parse the value, determine which fields it can
satisfy, and call satisfy() with the viable fields.
Important: When multiple fields can be satisfied by the value,
pick the one with the lowest score (most specific). Scores are assigned
by specificity, e.g., u8 has a lower score than u16.
Fields
Solved(ResolutionHandle<'a>)
This key disambiguated to exactly one configuration.
Unknown
This key doesn’t exist in any remaining candidate.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for KeyResult<'a>
impl<'a> RefUnwindSafe for KeyResult<'a>
impl<'a> Send for KeyResult<'a>
impl<'a> Sync for KeyResult<'a>
impl<'a> Unpin for KeyResult<'a>
impl<'a> UnsafeUnpin for KeyResult<'a>
impl<'a> UnwindSafe for KeyResult<'a>
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