Skip to main content

Clip

Struct Clip 

Source
#[non_exhaustive]
pub struct Clip { pub id: ClipId, pub source_id: SourceId, pub timeline_range: TimeRange, pub source_range: TimeRange, pub visual: VisualProperties, pub composition: Option<ClipComposition>, pub blend_mode: ClipBlendMode, pub masks: Vec<ShapeMask>, pub matte: Option<Matte>, pub time_map: TimeMap, pub audio: AudioProperties, pub cache: CacheIntent, }
Expand description

A reference to a source over independent timeline and source ranges.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: ClipId

Stable clip identity.

§source_id: SourceId

Source consumed by this clip.

§timeline_range: TimeRange

Destination interval on the project timeline.

§source_range: TimeRange

Interval read from the source timeline.

§visual: VisualProperties

Resolution-independent visual presentation controls.

§composition: Option<ClipComposition>

The composition graph that builds the clip’s picture from its source, with the clip’s time mapping onto it. Without one the clip shows its source as it is. Visual clips only.

§blend_mode: ClipBlendMode

Artistic operation used when this clip is composited over earlier layers.

§masks: Vec<ShapeMask>

Shapes that limit where the clip is visible, applied in order after its composition and before its transform. At most crate::MAX_CLIP_MASKS; visual clips only.

§matte: Option<Matte>

Another visual clip whose picture sets where this clip is visible.

§time_map: TimeMap

How timeline time maps onto the source range.

§audio: AudioProperties

Presentation controls applied to this clip’s audio.

§cache: CacheIntent

Whether a runtime may keep and reuse the clip’s rendered picture. Never changes what renders: a kept picture is the one a live render draws.

Implementations§

Source§

impl Clip

Source

pub fn new( id: ClipId, source_id: SourceId, timeline_range: TimeRange, source_range: TimeRange, ) -> Self

Creates a clip with default visual, blend, and audio controls and no composition.

Trait Implementations§

Source§

impl Clone for Clip

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Clip

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Clip

Source§

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 PartialEq for Clip

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Clip

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Clip

Auto Trait Implementations§

§

impl Freeze for Clip

§

impl RefUnwindSafe for Clip

§

impl Send for Clip

§

impl Sync for Clip

§

impl Unpin for Clip

§

impl UnsafeUnpin for Clip

§

impl UnwindSafe for Clip

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.