pub struct GlobalSearchHit {
pub id: String,
pub kind: String,
pub kind_label: String,
pub title: String,
pub subtitle: Option<String>,
pub highlight: Option<String>,
pub route: String,
pub image_url: Option<String>,
pub avatar_url: Option<String>,
pub score: f64,
pub updated_at: Option<String>,
}Expand description
单条全局搜索结果。
Fields§
§id: String结果唯一标识。
kind: String结果分区。
kind_label: String分区展示名称。
title: String主标题。
subtitle: Option<String>副标题。
highlight: Option<String>命中的摘要内容。
route: String前端跳转路径。
image_url: Option<String>图片地址或 objectKey。
avatar_url: Option<String>头像地址或 objectKey。
score: f64相关度得分。
updated_at: Option<String>更新时间,ISO 字符串。
Trait Implementations§
Source§impl Clone for GlobalSearchHit
impl Clone for GlobalSearchHit
Source§fn clone(&self) -> GlobalSearchHit
fn clone(&self) -> GlobalSearchHit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlobalSearchHit
impl Debug for GlobalSearchHit
Source§impl<'de> Deserialize<'de> for GlobalSearchHit
impl<'de> Deserialize<'de> for GlobalSearchHit
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 GlobalSearchHit
impl RefUnwindSafe for GlobalSearchHit
impl Send for GlobalSearchHit
impl Sync for GlobalSearchHit
impl Unpin for GlobalSearchHit
impl UnsafeUnpin for GlobalSearchHit
impl UnwindSafe for GlobalSearchHit
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request