pub struct FieldidsWeightsMap { /* private fields */ }
Implementations§
Source§impl FieldidsWeightsMap
impl FieldidsWeightsMap
Sourcepub fn insert(&mut self, fid: FieldId, weight: Weight) -> Option<Weight>
pub fn insert(&mut self, fid: FieldId, weight: Weight) -> Option<Weight>
Insert a field id -> weigth into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old value is returned.
Sourcepub fn from_field_id_map_without_searchable(fid_map: &FieldsIdsMap) -> Self
pub fn from_field_id_map_without_searchable(fid_map: &FieldsIdsMap) -> Self
Create the map from the fields ids maps. Should only be called in the case there are NO searchable attributes. All the fields will be inserted in the order of the fields ids map with a weight of 0.
Trait Implementations§
Source§impl Debug for FieldidsWeightsMap
impl Debug for FieldidsWeightsMap
Source§impl Default for FieldidsWeightsMap
impl Default for FieldidsWeightsMap
Source§fn default() -> FieldidsWeightsMap
fn default() -> FieldidsWeightsMap
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FieldidsWeightsMap
impl<'de> Deserialize<'de> for FieldidsWeightsMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FieldidsWeightsMap
impl RefUnwindSafe for FieldidsWeightsMap
impl Send for FieldidsWeightsMap
impl Sync for FieldidsWeightsMap
impl Unpin for FieldidsWeightsMap
impl UnwindSafe for FieldidsWeightsMap
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more