Skip to main content

EditOp

Enum EditOp 

Source
pub enum EditOp {
    Split {
        at: Frame,
    },
    Trim {
        index: usize,
        edge: TrimEdge,
        to: Frame,
    },
    RippleDelete {
        start: Frame,
        end: Frame,
    },
    SetSpeed {
        index: usize,
        timescale: f64,
    },
    AddZoom {
        zoom: ZoomSegment,
    },
    RemoveZoom {
        id: ZoomId,
    },
    MoveZoom {
        id: ZoomId,
        start: Frame,
        end: Frame,
    },
    SetCrop {
        rect: CropRect,
    },
    SetAspect {
        ratio: AspectRatio,
    },
    SetBackground {
        config: BackgroundConfig,
    },
    SetCursor {
        cursor: CursorConfig,
    },
    SetZoomEase {
        id: ZoomId,
        ease: EditEase,
    },
}
Expand description

A single, undoable edit applied to an EditProject.

Variants§

§

Split

Split the segment containing project frame at into two adjacent segments sharing the cut. A no-op if at lands on a boundary.

Fields

§at: Frame

Project frame to cut at.

§

Trim

Move segment index’s in/out point to source frame to, clamped so the segment stays non-empty and within the source.

Fields

§index: usize
§edge: TrimEdge

Which edge to move.

§to: Frame

Target source frame.

§

RippleDelete

Remove project range [start, end), closing the gap (ripple).

Fields

§start: Frame

Range start (project frame, inclusive).

§end: Frame

Range end (project frame, exclusive).

§

SetSpeed

Set segment index’s playback speed (timescale), sanitized to a finite positive multiplier.

Fields

§index: usize
§timescale: f64

New speed multiplier.

§

AddZoom

Add a zoom region. Its id is assigned fresh on insert (the id field of the supplied value is ignored).

Fields

§zoom: ZoomSegment

The zoom to add (window / amount / mode / ease).

§

RemoveZoom

Remove the zoom with the given id.

Fields

§id: ZoomId

Id of the zoom to remove.

§

MoveZoom

Move a zoom’s window to [start, end).

Fields

§id: ZoomId

Id of the zoom to move.

§start: Frame

New window start (project frame).

§end: Frame

New window end (project frame).

§

SetCrop

Set the crop rectangle. A full-frame rect clears the crop.

Fields

§rect: CropRect

Normalized crop rect ([0, 1] of the source frame).

§

SetAspect

Set the output aspect ratio (reframes the export canvas).

Fields

§ratio: AspectRatio

New aspect ratio.

§

SetBackground

Set the background framing (backdrop + padding / radius / shadow).

Fields

§config: BackgroundConfig

New background config.

§

SetCursor

Set the cursor styling (size / smoothing / ripples / hide-static).

Fields

§cursor: CursorConfig

New cursor config.

§

SetZoomEase

Retune the easing curve of the zoom with the given id (ED.13).

Fields

§id: ZoomId

Id of the zoom to retune.

§ease: EditEase

New easing curve.

Trait Implementations§

Source§

impl Clone for EditOp

Source§

fn clone(&self) -> EditOp

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 EditOp

Source§

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

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

impl PartialEq for EditOp

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EditOp

Auto Trait Implementations§

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.