pub struct Model {Show 23 fields
pub id: String,
pub channel_id: String,
pub title: String,
pub description: String,
pub published_at: DateTimeWithTimeZone,
pub thumbnail_url: String,
pub thumbnails: Option<Value>,
pub duration_seconds: Option<i32>,
pub tags: Option<Value>,
pub category_id: Option<String>,
pub view_count: Option<i64>,
pub like_count: Option<i64>,
pub comment_count: Option<i64>,
pub default_language: Option<String>,
pub live_broadcast_content: Option<String>,
pub source_tab: Option<String>,
pub stats_refreshed_at: Option<DateTimeWithTimeZone>,
pub subtitle_availability: Option<Value>,
pub captions_available: Option<bool>,
pub created_at: DateTimeWithTimeZone,
pub updated_at: DateTimeWithTimeZone,
pub transcript_status: String,
pub chapters_status: String,
}Fields§
§id: String§channel_id: String§title: String§description: String§published_at: DateTimeWithTimeZone§thumbnail_url: String§thumbnails: Option<Value>§duration_seconds: Option<i32>Whole seconds. Both backends report duration differently on the wire; the harvester normalizes them before writing.
category_id: Option<String>§view_count: Option<i64>§like_count: Option<i64>§comment_count: Option<i64>§default_language: Option<String>§live_broadcast_content: Option<String>§source_tab: Option<String>Which channel tab this video was harvested from. See ChannelAbout for why the remaining channel statistics are nullable.
stats_refreshed_at: Option<DateTimeWithTimeZone>§subtitle_availability: Option<Value>Caption tracks the yt-dlp backend reported, as {"manual": [...], "auto": [...]}.
None means unknown, not none. The v3 backend cannot see caption
tracks - it would need a separate quota-costing captions.list call per
video - so a v3-only harvest leaves this NULL. A source policy reading
NULL as “this video has no captions” would skip videos that have them,
which is why this is nullable and never defaulted to an empty object.
captions_available: Option<bool>Whether the video has captions at all, as a yes/no both backends can answer.
Some(false) is the only value that lets a transcript fetch be skipped.
None is unknown - the v3 backend has not asked - and a planner reading
it as “no captions” would skip videos that have them.
created_at: DateTimeWithTimeZone§updated_at: DateTimeWithTimeZone§transcript_status: String§chapters_status: StringOutcome of a chapter fetch: pending, fetched, no_chapters, or
failed. Free text with no CHECK, exactly like transcript_status.
pending is the insert default and means unknown; the v3 backend
cannot see chapters, so a v3-only harvest leaves this pending until
tango-rs chapters (or a later yt-dlp harvest) fills it.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
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>,
Source§impl From<Model> for ActiveModel
impl From<Model> for ActiveModel
Source§impl FromQueryResult for Model
impl FromQueryResult for Model
Source§fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
Source§fn from_query_result_nullable(
row: &QueryResult,
pre: &str,
) -> Result<Self, TryGetError>
fn from_query_result_nullable( row: &QueryResult, pre: &str, ) -> Result<Self, TryGetError>
Source§fn from_query_result_optional(
res: &QueryResult,
pre: &str,
) -> Result<Option<Self>, DbErr>
fn from_query_result_optional( res: &QueryResult, pre: &str, ) -> Result<Option<Self>, DbErr>
Source§fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
Source§impl IntoActiveModel<ActiveModel> for Model
impl IntoActiveModel<ActiveModel> for Model
Source§fn into_active_model(self) -> ActiveModel
fn into_active_model(self) -> ActiveModel
Source§impl ModelTrait for Model
impl ModelTrait for Model
Source§type Entity = Entity
type Entity = Entity
EntityTrait this model belongs to.Source§fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
Source§fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
Source§fn try_set(
&mut self,
c: <Self::Entity as EntityTrait>::Column,
v: Value,
) -> Result<(), DbErr>
fn try_set( &mut self, c: <Self::Entity as EntityTrait>::Column, v: Value, ) -> Result<(), DbErr>
Source§fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
try_set when the value comes
from untrusted input.Select for models related to self via the
Self::Entity: Related<R> relation. Use it together with .one(db) /
.all(db) to fetch the related rows.Source§fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
Source§fn get_primary_key_value(&self) -> ValueTuple
fn get_primary_key_value(&self) -> ValueTuple
impl StructuralPartialEq for Model
Source§impl TryFrom<ActiveModel> for Model
impl TryFrom<ActiveModel> for Model
Source§impl TryIntoModel<Model> for ActiveModel
impl TryIntoModel<Model> for ActiveModel
Auto Trait Implementations§
impl Forget for Model
impl Freeze for Modelwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
NonZero<i32>: Freeze,
FixedOffset: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Modelwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
FixedOffset: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for Modelwhere
RawVecInner: UnwindSafe,
NonZero<i32>: UnwindSafe,
FixedOffset: UnwindSafe,
BTreeMap<String, Value>: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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 moreSource§impl<T> PartialModelTrait for Twhere
T: ModelTrait + FromQueryResult,
impl<T> PartialModelTrait for Twhere
T: ModelTrait + FromQueryResult,
Source§fn select_cols_nested<S>(
select: S,
prefix: Option<&str>,
alias: Option<&'static str>,
) -> Swhere
S: QuerySelect,
fn select_cols_nested<S>(
select: S,
prefix: Option<&str>,
alias: Option<&'static str>,
) -> Swhere
S: QuerySelect,
Source§fn select_cols<S>(select: S) -> Swhere
S: QuerySelect,
fn select_cols<S>(select: S) -> Swhere
S: QuerySelect,
QuerySelect’s projection. Read more