pub struct Note {
pub id: NoteId,
pub content: String,
pub frame: Option<i64>,
pub created_at: DateTime<Utc>,
pub created_by: Option<String>,
pub modified_at: DateTime<Utc>,
pub reply_to: Option<NoteId>,
}Expand description
A note or annotation on a clip.
Fields§
§id: NoteIdUnique identifier.
content: StringNote content.
frame: Option<i64>Optional frame position.
created_at: DateTime<Utc>Created timestamp.
created_by: Option<String>Created by user.
modified_at: DateTime<Utc>Last modified timestamp.
reply_to: Option<NoteId>Reply to another note (for threading).
Implementations§
Source§impl Note
impl Note
Sourcepub fn at_frame(content: impl Into<String>, frame: i64) -> Self
pub fn at_frame(content: impl Into<String>, frame: i64) -> Self
Creates a note at a specific frame.
Sourcepub fn reply_to(content: impl Into<String>, reply_to: NoteId) -> Self
pub fn reply_to(content: impl Into<String>, reply_to: NoteId) -> Self
Creates a reply to another note.
Sourcepub fn set_created_by(&mut self, user: impl Into<String>)
pub fn set_created_by(&mut self, user: impl Into<String>)
Sets the creator.
Sourcepub fn set_content(&mut self, content: impl Into<String>)
pub fn set_content(&mut self, content: impl Into<String>)
Updates the content.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Note
impl<'de> Deserialize<'de> for Note
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 Note
impl RefUnwindSafe for Note
impl Send for Note
impl Sync for Note
impl Unpin for Note
impl UnsafeUnpin for Note
impl UnwindSafe for Note
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> 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 more