Trait freya::prelude::Dependency

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

    // 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 + 'static

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,)

§

type Out = (A,)

§

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

§

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

§

impl<A> Dependency for &A

§

type Out = A

§

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

§

impl<A, B> Dependency for (&A, &B)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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)

§

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§