Trait freya::prelude::Dependency

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§

type Out: Clone + PartialEq

The output of the dependency

Required Methods§

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

Returns the output of the dependency.

Provided Methods§

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

Returns true if the dependency has changed.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Dependency for ()

§

type Out = ()

§

fn out(&self) -> <() as Dependency>::Out

§

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

§

type Out = (A,)

§

fn out(&self) -> <(&A,) as Dependency>::Out

§

fn changed(&self, other: &<(&A,) as Dependency>::Out) -> bool

§

impl<A> Dependency for &Awhere A: Dep,

§

type Out = A

§

fn out(&self) -> <&A as Dependency>::Out

§

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

§

type Out = (A, B)

§

fn out(&self) -> <(&A, &B) as Dependency>::Out

§

fn changed(&self, other: &<(&A, &B) as Dependency>::Out) -> bool

§

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

§

type Out = (A, B, C)

§

fn out(&self) -> <(&A, &B, &C) as Dependency>::Out

§

fn changed(&self, other: &<(&A, &B, &C) as Dependency>::Out) -> bool

§

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)

§

fn out(&self) -> <(&A, &B, &C, &D) as Dependency>::Out

§

fn changed(&self, other: &<(&A, &B, &C, &D) as Dependency>::Out) -> bool

§

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)

§

fn out(&self) -> <(&A, &B, &C, &D, &E) as Dependency>::Out

§

fn changed(&self, other: &<(&A, &B, &C, &D, &E) as Dependency>::Out) -> bool

§

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)

§

fn out(&self) -> <(&A, &B, &C, &D, &E, &F) as Dependency>::Out

§

fn changed(&self, other: &<(&A, &B, &C, &D, &E, &F) as Dependency>::Out) -> bool

§

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)

§

fn out(&self) -> <(&A, &B, &C, &D, &E, &F, &G) as Dependency>::Out

§

fn changed( &self, other: &<(&A, &B, &C, &D, &E, &F, &G) as Dependency>::Out ) -> bool

§

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)

§

fn out(&self) -> <(&A, &B, &C, &D, &E, &F, &G, &H) as Dependency>::Out

§

fn changed( &self, other: &<(&A, &B, &C, &D, &E, &F, &G, &H) as Dependency>::Out ) -> bool

Implementors§