pub struct Scored<E: Entity> {
pub entity: E,
pub score: f64,
pub aux: BTreeMap<String, f64>,
}Expand description
A scored entity in a ranked list.
Fields§
§entity: E§score: f64§aux: BTreeMap<String, f64>Optional secondary scores for display (e.g. “lines”, “tokens”).
Implementations§
Trait Implementations§
Source§impl<E> JsonSchema for Scored<E>where
E: JsonSchema + Entity,
impl<E> JsonSchema for Scored<E>where
E: JsonSchema + Entity,
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl<E> Freeze for Scored<E>where
E: Freeze,
impl<E> RefUnwindSafe for Scored<E>where
E: RefUnwindSafe,
impl<E> Send for Scored<E>where
E: Send,
impl<E> Sync for Scored<E>where
E: Sync,
impl<E> Unpin for Scored<E>where
E: Unpin,
impl<E> UnsafeUnpin for Scored<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for Scored<E>where
E: UnwindSafe,
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