pub struct SearchHit {Show 13 fields
pub id: String,
pub channel_id: String,
pub title: String,
pub description: String,
pub thumbnail_url: String,
pub published_at: Option<DateTime<FixedOffset>>,
pub source: String,
pub score: f32,
pub match_tier: i32,
pub matched_by: String,
pub matched_field: Option<String>,
pub snippet: String,
pub start_ms: Option<i32>,
}Fields§
§id: String§channel_id: String§title: String§description: String§thumbnail_url: String§published_at: Option<DateTime<FixedOffset>>§source: Stringvideo or playlist.
score: f32§match_tier: i322 for a title/description/tags full-text hit, 1 for a fuzzy title match, 0 for a transcript hit. Separate tiers rather than one numeric scale, because a title match and a transcript hit are different kinds of evidence - see migration 0011.
matched_by: StringThe mode that matched: fts, fuzzy, substring or transcript.
matched_field: Option<String>Which field it matched in: title, description, tags or
transcript. Null only for a fuzzy hit, which only ever looks at
titles and would otherwise be redundant with matched_by.
snippet: String§start_ms: Option<i32>Position of the best matching transcript cue, in milliseconds. None
for everything that is not a transcript.
Seek with player.seekTo(start_ms / 1000). This is the reason a
transcript hit is worth surfacing separately from a title match: it
answers where, not just which video.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for SearchHit
impl Freeze for SearchHit
impl Move for SearchHit
impl RefUnwindSafe for SearchHit
impl Send for SearchHit
impl Sync for SearchHit
impl Unpin for SearchHit
impl UnsafeUnpin for SearchHitwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
FixedOffset: UnsafeUnpin,
impl UnwindSafe for SearchHit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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