pub struct ConcatSegment {
pub source: String,
pub in_point: Option<f64>,
pub out_point: Option<f64>,
pub transition: TransitionKind,
}Expand description
A single input segment in the concat list.
Fields§
§source: StringPath or URI to the source media.
in_point: Option<f64>Optional in-point in seconds (trim start).
out_point: Option<f64>Optional out-point in seconds (trim end).
transition: TransitionKindTransition to apply after this segment (before the next).
Implementations§
Source§impl ConcatSegment
impl ConcatSegment
Sourcepub fn new(source: impl Into<String>) -> Self
pub fn new(source: impl Into<String>) -> Self
Create a segment from a source path with defaults (full duration, hard cut).
Sourcepub fn with_in_point(self, seconds: f64) -> Self
pub fn with_in_point(self, seconds: f64) -> Self
Set in-point.
Sourcepub fn with_out_point(self, seconds: f64) -> Self
pub fn with_out_point(self, seconds: f64) -> Self
Set out-point.
Sourcepub fn with_transition(self, t: TransitionKind) -> Self
pub fn with_transition(self, t: TransitionKind) -> Self
Set transition after this segment.
Sourcepub fn effective_duration(&self) -> Option<f64>
pub fn effective_duration(&self) -> Option<f64>
Compute effective duration (returns None when both points are absent).
Trait Implementations§
Source§impl Clone for ConcatSegment
impl Clone for ConcatSegment
Source§fn clone(&self) -> ConcatSegment
fn clone(&self) -> ConcatSegment
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 moreAuto Trait Implementations§
impl Freeze for ConcatSegment
impl RefUnwindSafe for ConcatSegment
impl Send for ConcatSegment
impl Sync for ConcatSegment
impl Unpin for ConcatSegment
impl UnsafeUnpin for ConcatSegment
impl UnwindSafe for ConcatSegment
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,
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