Struct floem_reactive::ReadSignal
source · pub struct ReadSignal<T> { /* private fields */ }
Expand description
A getter only Signal
Implementations§
source§impl<T: Clone> ReadSignal<T>
impl<T: Clone> ReadSignal<T>
sourcepub fn get(&self) -> Twhere
T: 'static,
pub fn get(&self) -> Twhere
T: 'static,
Clones and returns the current value stored in the Signal, and subcribes to the current runnig effect to this Signal.
sourcepub fn get_untracked(&self) -> Twhere
T: 'static,
pub fn get_untracked(&self) -> Twhere
T: 'static,
Clones and returns the current value stored in the Signal, but it doesn’t subcribe to the current runnig effect.
source§impl<T> ReadSignal<T>
impl<T> ReadSignal<T>
sourcepub fn with<O>(&self, f: impl FnOnce(&T) -> O) -> Owhere
T: 'static,
pub fn with<O>(&self, f: impl FnOnce(&T) -> O) -> Owhere
T: 'static,
Applies a clsoure to the current value stored in the Signal, and subcribes to the current runnig effect to this Memo.
sourcepub fn with_untracked<O>(&self, f: impl FnOnce(&T) -> O) -> Owhere
T: 'static,
pub fn with_untracked<O>(&self, f: impl FnOnce(&T) -> O) -> Owhere
T: 'static,
Applies a clsoure to the current value stored in the Signal, but it doesn’t subcribe to the current runnig effect.
Trait Implementations§
source§impl<T> Clone for ReadSignal<T>
impl<T> Clone for ReadSignal<T>
source§impl<T> PartialEq for ReadSignal<T>
impl<T> PartialEq for ReadSignal<T>
impl<T> Copy for ReadSignal<T>
impl<T> Eq for ReadSignal<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for ReadSignal<T>where
T: RefUnwindSafe,
impl<T> Send for ReadSignal<T>where
T: Send,
impl<T> Sync for ReadSignal<T>where
T: Sync,
impl<T> Unpin for ReadSignal<T>where
T: Unpin,
impl<T> UnwindSafe for ReadSignal<T>where
T: UnwindSafe,
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