pub struct SessionTimecode(/* private fields */);Expand description
An explicit editorial timecode from which a recording session can advance.
The send-only Timecode::SYNTHESIZE sentinel is not a recording start.
Choose a value such as zero when the source has no meaningful timecode.
use grafton_ndi::{file::{RecordingTimecode, SessionTimecode}, Timecode};
let start = SessionTimecode::new(Timecode::from_ticks(0))?;
let policy = RecordingTimecode::GenerateFrom(start);
assert_eq!(start.timecode(), Timecode::from_ticks(0));
assert!(SessionTimecode::new(Timecode::SYNTHESIZE).is_err());Implementations§
Source§impl SessionTimecode
impl SessionTimecode
Sourcepub fn new(timecode: Timecode) -> Result<Self>
pub fn new(timecode: Timecode) -> Result<Self>
Validate an explicit recording start without changing its ticks.
Negative values and every value except the send sentinel are accepted.
§Errors
Error::InvalidInput for Timecode::SYNTHESIZE, including the
default Timecode. Use an explicit start such as zero instead.
Trait Implementations§
Source§impl Clone for SessionTimecode
impl Clone for SessionTimecode
impl Copy for SessionTimecode
Source§impl Debug for SessionTimecode
impl Debug for SessionTimecode
impl Eq for SessionTimecode
Source§impl Hash for SessionTimecode
impl Hash for SessionTimecode
Source§impl Ord for SessionTimecode
impl Ord for SessionTimecode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SessionTimecode
impl PartialEq for SessionTimecode
Source§impl PartialOrd for SessionTimecode
impl PartialOrd for SessionTimecode
impl StructuralPartialEq for SessionTimecode
Auto Trait Implementations§
impl Freeze for SessionTimecode
impl RefUnwindSafe for SessionTimecode
impl Send for SessionTimecode
impl Sync for SessionTimecode
impl Unpin for SessionTimecode
impl UnsafeUnpin for SessionTimecode
impl UnwindSafe for SessionTimecode
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