Trait reactive_graph::traits::With

source ·
pub trait With: DefinedAt {
    type Value: ?Sized;

    // Required method
    fn try_with<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> Option<U>;

    // Provided method
    fn with<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U { ... }
}

Required Associated Types§

Required Methods§

source

fn try_with<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> Option<U>

Provided Methods§

source

fn with<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> With for T
where T: WithUntracked + Track,

§

type Value = <T as WithUntracked>::Value