pub struct FieldCore<T> {
pub signal: Signal<T>,
pub interceptors: Arc<Mutex<Vec<(u64, Arc<dyn Fn(Change<T>) -> Option<Change<T>> + Send + Sync + 'static>)>>>,
pub next_interceptor_id: Arc<AtomicUsize>,
pub intercept_depth: Arc<AtomicUsize>,
}Fields§
§signal: Signal<T>§interceptors: Arc<Mutex<Vec<(u64, Arc<dyn Fn(Change<T>) -> Option<Change<T>> + Send + Sync + 'static>)>>>§next_interceptor_id: Arc<AtomicUsize>§intercept_depth: Arc<AtomicUsize>Implementations§
Source§impl<T: Clone + 'static> FieldCore<T>
impl<T: Clone + 'static> FieldCore<T>
pub fn new_with_signal(initial: Signal<T>) -> Self
pub fn new(initial: T) -> Self
pub fn get(&self) -> T
pub fn subscribe<F>(&self, callback: F) -> SignalSubscription
pub fn subscribe_with_source<F>(&self, callback: F) -> SignalSubscription
pub fn intercept<F>(&self, path: Arc<str>, callback: F) -> InterceptDisposer
pub fn run_interceptors( &self, path: Arc<str>, value: T, source: Option<Uuid>, ) -> Result<Change<T>, String>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FieldCore<T>
impl<T> RefUnwindSafe for FieldCore<T>where
T: RefUnwindSafe,
impl<T> Send for FieldCore<T>
impl<T> Sync for FieldCore<T>
impl<T> Unpin for FieldCore<T>
impl<T> UnsafeUnpin for FieldCore<T>
impl<T> UnwindSafe for FieldCore<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more