pub struct MetaHit {
pub index: usize,
pub hit: Option<Hit>,
pub meta: SearchRespMeta,
}Expand description
Search Hit accompanied by its index (position among hits),
and the metadata from the search response.
Used for streaming search to the client individually to improve latency.
Fields§
§index: usizeThis hit’s index within the returned results.
hit: Option<Hit>The hit value.
Will be None if the search produced no hits. In this case, this should be the only item returned the stream.
meta: SearchRespMetaMetadata from the search response that returned this hit.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetaHit
impl<'de> Deserialize<'de> for MetaHit
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 MetaHit
impl RefUnwindSafe for MetaHit
impl Send for MetaHit
impl Sync for MetaHit
impl Unpin for MetaHit
impl UnsafeUnpin for MetaHit
impl UnwindSafe for MetaHit
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<'de, T> Marshal<'de> for Twhere
T: Serialize + Deserialize<'de>,
impl<'de, T> Marshal<'de> for Twhere
T: Serialize + Deserialize<'de>,
Source§fn to_byte_vec(&self) -> Result<Vec<u8>, MarshalError>
fn to_byte_vec(&self) -> Result<Vec<u8>, MarshalError>
Attempts to serialize (marshal) to a byte vec. Read more
Source§fn from_bytes(bytes: &'de [u8]) -> Result<Self, MarshalError>
fn from_bytes(bytes: &'de [u8]) -> Result<Self, MarshalError>
Attempts to deserialize (unmarshal) from a byte slice. Read more