pub struct Signal<T>(/* private fields */);Expand description
Implementations§
Source§impl<T> Signal<T>where
T: Clone + 'static,
impl<T> Signal<T>where
T: Clone + 'static,
Sourcepub fn derived(f: impl Fn() -> T + 'static) -> Signal<T>where
T: Default,
pub fn derived(f: impl Fn() -> T + 'static) -> Signal<T>where
T: Default,
A derived signal. The closure runs lazily on the first get.
Sourcepub fn with_name(self, name: impl Into<Rc<str>>) -> Signal<T>
pub fn with_name(self, name: impl Into<Rc<str>>) -> Signal<T>
Name used in diagnostics (cycle panics, inspector).
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Signal<T>
impl<T> !Send for Signal<T>
impl<T> !Sync for Signal<T>
impl<T> !UnwindSafe for Signal<T>
impl<T> Freeze for Signal<T>
impl<T> Unpin for Signal<T>
impl<T> UnsafeUnpin for Signal<T>where
Rc<SignalCell<T>>: UnsafeUnpin,
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