pub struct TimecodeEvent {
pub timecode: Timecode,
pub kind: EventKind,
pub label: String,
pub payload: Option<String>,
}Expand description
A single timecode event record.
Fields§
§timecode: TimecodeThe timecode at which this event was captured.
kind: EventKindThe kind of event.
label: StringOptional human-readable label (e.g., “Scene 3 Slate”).
payload: Option<String>Optional arbitrary payload (e.g., JSON-encoded metadata).
Implementations§
Source§impl TimecodeEvent
impl TimecodeEvent
Sourcepub fn new(timecode: Timecode, kind: EventKind) -> Self
pub fn new(timecode: Timecode, kind: EventKind) -> Self
Create a new event with the given kind and an empty label.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Attach a human-readable label to this event.
Sourcepub fn with_payload(self, payload: impl Into<String>) -> Self
pub fn with_payload(self, payload: impl Into<String>) -> Self
Attach an arbitrary payload string to this event.
Trait Implementations§
Source§impl Clone for TimecodeEvent
impl Clone for TimecodeEvent
Source§fn clone(&self) -> TimecodeEvent
fn clone(&self) -> TimecodeEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 TimecodeEvent
impl Debug for TimecodeEvent
Source§impl<'de> Deserialize<'de> for TimecodeEvent
impl<'de> Deserialize<'de> for TimecodeEvent
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
Source§impl Display for TimecodeEvent
impl Display for TimecodeEvent
Auto Trait Implementations§
impl Freeze for TimecodeEvent
impl RefUnwindSafe for TimecodeEvent
impl Send for TimecodeEvent
impl Sync for TimecodeEvent
impl Unpin for TimecodeEvent
impl UnsafeUnpin for TimecodeEvent
impl UnwindSafe for TimecodeEvent
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