Skip to main content

Movie

Struct Movie 

Source
pub struct Movie { /* private fields */ }
Expand description

A film and its edits. Cloning is cheap: the film itself is shared.

Implementations§

Source§

impl Movie

Source

pub fn with_project(&self, project: Project) -> Self

The same film with these edits.

Source

pub fn project(&self) -> &Project

Its edits.

Source

pub fn logical_size(&self) -> Size

The size of the app it shows, in logical pixels.

Source

pub fn background(&self) -> Color

The color behind everything.

Source

pub fn duration_ms(&self) -> u64

How long it runs with its edits, in milliseconds.

Source

pub fn film_duration_ms(&self) -> u64

How long the film runs with no edits.

Source

pub fn chapters(&self) -> &[Chapter]

Its chapters, on the edited timeline. A chapter that was cut starts where the cut left it, unless nothing of it remains.

Source

pub fn poster_ms(&self) -> u64

A moment to show before it plays: past any fade from black at the start, and past the coming in of an opening card, so that it shows its words.

Source

pub fn chapter_at(&self, ms: u64) -> Option<usize>

The chapter playing at ms of the timeline.

Source

pub fn hotspots(&self) -> &[Hotspot]

Its hotspots, on the edited timeline.

Source

pub fn draw_list(&self, film_ms: u64) -> Option<(usize, Rc<[u32]>)>

What the app drew at this moment of the film.

Source

pub fn primitive(&self, index: u32) -> Option<&Primitive>

A thing the app drew, from a Self::draw_list.

Source

pub fn pointer_at(&self, film_ms: u64) -> Option<Point>

Where the pointer was at this moment of the film.

Source

pub fn click_before(&self, film_ms: u64) -> Option<(Point, u64)>

The last click at or before this moment of the film, and how long ago it was.

Source

pub fn to_bytes(&self) -> Vec<u8> ⓘ

The whole film as the bytes of a file, with its edits.

Source

pub fn from_bytes(bytes: &[u8]) -> Result<Self, MovieError>

Reads a film back from the bytes of a file.

Trait Implementations§

Source§

impl Clone for Movie

Source§

fn clone(&self) -> Movie

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 Movie

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Movie

§

impl !Send for Movie

§

impl !Sync for Movie

§

impl !UnwindSafe for Movie

§

impl Freeze for Movie

§

impl Unpin for Movie

§

impl UnsafeUnpin for Movie

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
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more