Skip to main content

Reactive

Trait Reactive 

Source
pub trait Reactive<T>:
    Clone
    + Send
    + Sync
    + 'static
where T: Clone + Send + Sync + 'static,
{ // Required methods fn get(&self) -> T; fn subscribe_with_source<F>(&self, callback: F) -> SignalSubscription where F: Fn(T, Option<Uuid>) + Send + Sync + 'static; // Provided methods fn subscribe<F>(&self, callback: F) -> SignalSubscription where F: Fn(T) + Send + Sync + 'static { ... } fn keepalive(&self) -> Option<Arc<dyn Send + Sync>> { ... } }

Required Methods§

Source

fn get(&self) -> T

Source

fn subscribe_with_source<F>(&self, callback: F) -> SignalSubscription
where F: Fn(T, Option<Uuid>) + Send + Sync + 'static,

Provided Methods§

Source

fn subscribe<F>(&self, callback: F) -> SignalSubscription
where F: Fn(T) + Send + Sync + 'static,

Source

fn keepalive(&self) -> Option<Arc<dyn Send + Sync>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Reactive<T> for Pipeline<T>
where T: Clone + Send + Sync + 'static,

Source§

impl<TValue, S, M> Reactive<TValue> for Field<TValue, S, M>
where TValue: FieldValue, S: Store, M: AccessMode,