pub trait Dependency: Sized + Clone {
    type Out: Clone + PartialEq;

    // Required method
    fn out(&self) -> Self::Out;

    // Provided method
    fn changed(&self, other: &Self::Out) -> bool { ... }
}
Expand description

A dependency is a trait that can be used to determine if a effect or selector should be re-run.

Required Associated Types§

source

type Out: Clone + PartialEq

The output of the dependency

Required Methods§

source

fn out(&self) -> Self::Out

Returns the output of the dependency.

Provided Methods§

source

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

Returns true if the dependency has changed.

Implementations on Foreign Types§

source§

impl<A> Dependency for (&A,)where A: Dep,

§

type Out = (A,)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl<A, B, C> Dependency for (&A, &B, &C)where A: Dep, B: Dep, C: Dep,

§

type Out = (A, B, C)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl<A, B, C, D, E, F> Dependency for (&A, &B, &C, &D, &E, &F)where A: Dep, B: Dep, C: Dep, D: Dep, E: Dep, F: Dep,

§

type Out = (A, B, C, D, E, F)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl<A, B, C, D, E> Dependency for (&A, &B, &C, &D, &E)where A: Dep, B: Dep, C: Dep, D: Dep, E: Dep,

§

type Out = (A, B, C, D, E)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl<A, B> Dependency for (&A, &B)where A: Dep, B: Dep,

§

type Out = (A, B)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl Dependency for ()

§

type Out = ()

source§

fn out(&self) -> Self::Out

source§

impl<A, B, C, D, E, F, G> Dependency for (&A, &B, &C, &D, &E, &F, &G)where A: Dep, B: Dep, C: Dep, D: Dep, E: Dep, F: Dep, G: Dep,

§

type Out = (A, B, C, D, E, F, G)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl<A, B, C, D, E, F, G, H> Dependency for (&A, &B, &C, &D, &E, &F, &G, &H)where A: Dep, B: Dep, C: Dep, D: Dep, E: Dep, F: Dep, G: Dep, H: Dep,

§

type Out = (A, B, C, D, E, F, G, H)

source§

fn out(&self) -> Self::Out

source§

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

source§

impl<A: Dep> Dependency for &A

§

type Out = A

source§

fn out(&self) -> Self::Out

source§

impl<A, B, C, D> Dependency for (&A, &B, &C, &D)where A: Dep, B: Dep, C: Dep, D: Dep,

§

type Out = (A, B, C, D)

source§

fn out(&self) -> Self::Out

source§

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

Implementors§