Skip to main content

SignalWith

Trait SignalWith 

Source
pub trait SignalWith<T> {
    // Required method
    fn id(&self) -> Id;

    // Provided methods
    fn with<O>(&self, f: impl FnOnce(&T) -> O) -> O
       where T: 'static { ... }
    fn with_untracked<O>(&self, f: impl FnOnce(&T) -> O) -> O
       where T: 'static { ... }
    fn try_with<O>(&self, f: impl FnOnce(Option<&T>) -> O) -> O
       where T: 'static { ... }
    fn try_with_untracked<O>(&self, f: impl FnOnce(Option<&T>) -> O) -> O
       where T: 'static { ... }
}

Required Methods§

Source

fn id(&self) -> Id

get the Signal Id

Provided Methods§

Source

fn with<O>(&self, f: impl FnOnce(&T) -> O) -> O
where T: 'static,

Source

fn with_untracked<O>(&self, f: impl FnOnce(&T) -> O) -> O
where T: 'static,

Source

fn try_with<O>(&self, f: impl FnOnce(Option<&T>) -> O) -> O
where T: 'static,

Source

fn try_with_untracked<O>(&self, f: impl FnOnce(Option<&T>) -> O) -> O
where T: 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> SignalWith<Option<T>> for FutureSignal<T>

Source§

fn id(&self) -> Id

Source§

impl<T> SignalWith<T> for Resource<T>

Source§

fn id(&self) -> Id

Source§

impl<T> SignalWith<T> for StreamSignal<T>

Source§

fn id(&self) -> Id

Source§

impl<T, E> SignalWith<T> for ChannelSignal<T, E>

Source§

fn id(&self) -> Id

Implementors§

Source§

impl<T> SignalWith<T> for BaseSignal<T>
where T: Clone + 'static,

Source§

impl<T> SignalWith<T> for SyncBaseSignal<T>
where T: Clone + Send + Sync + 'static,

Source§

impl<T> SignalWith<T> for Memo<T>
where T: PartialEq + 'static, ReadSignal<T>: SignalWith<T>,

Source§

impl<T> SignalWith<T> for ReadSignal<T>

Source§

impl<T> SignalWith<T> for ReadSignal<T, SyncStorage>
where T: Send + Sync,

Source§

impl<T> SignalWith<T> for RwSignal<T>

Source§

impl<T> SignalWith<T> for RwSignal<T, SyncStorage>
where T: Send + Sync,

Source§

impl<T, O, GF, UF> SignalWith<O> for DerivedRwSignal<T, O, GF, UF>
where T: Clone + 'static, O: Clone, GF: Fn(&T) -> O + Copy, UF: Fn(&O) -> T + Copy,

Source§

impl<T, O, GF, UF> SignalWith<O> for SyncDerivedRwSignal<T, O, GF, UF>
where T: Clone + Send + Sync + 'static, O: Clone + Send + Sync, GF: Fn(&T) -> O + Copy + Send + Sync, UF: Fn(&O) -> T + Copy + Send + Sync,