Skip to main content

CompositionReads

Struct CompositionReads 

Source
pub struct CompositionReads<'a> { /* private fields */ }
Expand description

What each composition’s output reads: the group inputs and clip nodes a walk from its output reaches, along the inputs drawing each node reads, into the compositions its group nodes draw. A group draws what its nodes would inline, so a group node needs only the ports its composition reads: a port it never reads may be left unconnected, and what a connected one reads is not drawn.

Built once for a project’s compositions, in dependency order, without recursion. A composition that uses itself (which validation refuses) is taken to read every port and draw the clip.

Implementations§

Source§

impl<'a> CompositionReads<'a>

Source

pub fn new(compositions: &HashMap<&'a CompositionId, &'a Composition>) -> Self

What each of compositions reads; it resolves group nodes by ID.

Source

pub fn reads_port(&self, composition: &CompositionId, port: usize) -> bool

Whether composition’s output reads its group input port; true for a composition these reads do not know.

Source

pub fn draws_clip(&self, composition: &CompositionId) -> bool

Whether composition, shown by a clip, draws the clip’s picture: its output reaches a clip node, directly or in a group. True for a composition these reads do not know.

Source

pub fn needed_inputs<'n>(&self, node: &'n CompositionNode) -> Vec<NodeInput<'n>>

The inputs drawing node reads, in input order: its CompositionNode::needed_inputs, of a group node only the ports its composition reads.

Trait Implementations§

Source§

impl<'a> Clone for CompositionReads<'a>

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<'a> Debug for CompositionReads<'a>

Source§

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

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

impl<'a> Default for CompositionReads<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for CompositionReads<'a>

§

impl<'a> RefUnwindSafe for CompositionReads<'a>

§

impl<'a> Send for CompositionReads<'a>

§

impl<'a> Sync for CompositionReads<'a>

§

impl<'a> Unpin for CompositionReads<'a>

§

impl<'a> UnsafeUnpin for CompositionReads<'a>

§

impl<'a> UnwindSafe for CompositionReads<'a>

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

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.