pub struct Commentary {
pub id: String,
pub video_id: String,
pub content: String,
pub style: CommentaryStyle,
pub language: String,
pub quality_score: f64,
pub keywords: Vec<String>,
pub timestamps: Vec<(f64, String)>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Commentary structure
Fields§
§id: StringUnique identifier for the commentary
video_id: StringAssociated video ID
content: StringCommentary content
style: CommentaryStyleCommentary style
language: StringCommentary language
quality_score: f64Quality score (0.0-1.0)
keywords: Vec<String>Generated keywords
timestamps: Vec<(f64, String)>Generated timestamps (if enabled)
created_at: DateTime<Utc>Creation timestamp
updated_at: DateTime<Utc>Last updated timestamp
Implementations§
Source§impl Commentary
impl Commentary
Sourcepub fn new(
video_id: String,
content: String,
style: CommentaryStyle,
language: String,
) -> Self
pub fn new( video_id: String, content: String, style: CommentaryStyle, language: String, ) -> Self
Create a new Commentary instance
Sourcepub fn update_timestamp(&mut self)
pub fn update_timestamp(&mut self)
Update the updated_at timestamp
Sourcepub fn set_quality_score(&mut self, score: f64)
pub fn set_quality_score(&mut self, score: f64)
Set the quality score
Trait Implementations§
Source§impl Clone for Commentary
impl Clone for Commentary
Source§fn clone(&self) -> Commentary
fn clone(&self) -> Commentary
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 Commentary
impl Debug for Commentary
Source§impl<'de> Deserialize<'de> for Commentary
impl<'de> Deserialize<'de> for Commentary
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 Commentary
impl RefUnwindSafe for Commentary
impl Send for Commentary
impl Sync for Commentary
impl Unpin for Commentary
impl UnsafeUnpin for Commentary
impl UnwindSafe for Commentary
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