pub enum KeyResult<'a> {
Unambiguous {
shape: &'static Shape,
},
Ambiguous {
fields: Vec<(&'a FieldInfo, u64)>,
},
Solved(&'a Resolution),
Unknown,
}Expand description
Result of reporting a key to the solver.
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(&'a Resolution)
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> 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