pub enum UseRwSignal<T: 'static, S = SyncStorage>where
S: Storage<T>,{
Separate(Signal<T, S>, WriteSignal<T, S>),
Combined(RwSignal<T, S>),
}
Variants§
Separate(Signal<T, S>, WriteSignal<T, S>)
Combined(RwSignal<T, S>)
Trait Implementations§
Source§impl<T, S> Clone for UseRwSignal<T, S>where
S: Storage<T>,
impl<T, S> Clone for UseRwSignal<T, S>where
S: Storage<T>,
Source§impl<T> Default for UseRwSignal<T>
impl<T> Default for UseRwSignal<T>
Source§impl<T> Default for UseRwSignal<T, LocalStorage>where
T: Default,
impl<T> Default for UseRwSignal<T, LocalStorage>where
T: Default,
Source§impl<T, S> DefinedAt for UseRwSignal<T, S>where
S: Storage<T>,
impl<T, S> DefinedAt for UseRwSignal<T, S>where
S: Storage<T>,
Source§fn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
Returns the location at which the signal was defined. This is usually simply
None
in
release mode.Source§impl<T, S, RS> From<(RS, WriteSignal<T, S>)> for UseRwSignal<T, S>
impl<T, S, RS> From<(RS, WriteSignal<T, S>)> for UseRwSignal<T, S>
Source§fn from(s: (RS, WriteSignal<T, S>)) -> Self
fn from(s: (RS, WriteSignal<T, S>)) -> Self
Converts to this type from the input type.
Source§impl<T, S> Set for UseRwSignal<T, S>
impl<T, S> Set for UseRwSignal<T, S>
Source§impl<T, S> Update for UseRwSignal<T, S>
impl<T, S> Update for UseRwSignal<T, S>
Source§fn update(&self, f: impl FnOnce(&mut T))
fn update(&self, f: impl FnOnce(&mut T))
Updates the value of the signal and notifies subscribers.
Source§fn try_update<O>(&self, f: impl FnOnce(&mut T) -> O) -> Option<O>
fn try_update<O>(&self, f: impl FnOnce(&mut T) -> O) -> Option<O>
Updates the value of the signal and notifies subscribers, returning the value that is
returned by the update function, or
None
if the signal has already been disposed.Source§fn maybe_update(&self, fun: impl FnOnce(&mut Self::Value) -> bool)
fn maybe_update(&self, fun: impl FnOnce(&mut Self::Value) -> bool)
Updates the value of the signal, but only notifies subscribers if the function
returns
true
.Source§fn try_maybe_update<U>(
&self,
fun: impl FnOnce(&mut Self::Value) -> (bool, U),
) -> Option<U>
fn try_maybe_update<U>( &self, fun: impl FnOnce(&mut Self::Value) -> (bool, U), ) -> Option<U>
Updates the value of the signal, notifying subscribers if the update function returns
(true, _)
, and returns the value returned by the update function,
or None
if the signal has already been disposed.Source§impl<T, S> With for UseRwSignal<T, S>
impl<T, S> With for UseRwSignal<T, S>
Source§impl<T, S> WithUntracked for UseRwSignal<T, S>where
RwSignal<T, S>: WithUntracked<Value = T>,
Signal<T, S>: WithUntracked<Value = T>,
ReadSignal<T, S>: WithUntracked<Value = T>,
S: Storage<T>,
impl<T, S> WithUntracked for UseRwSignal<T, S>where
RwSignal<T, S>: WithUntracked<Value = T>,
Signal<T, S>: WithUntracked<Value = T>,
ReadSignal<T, S>: WithUntracked<Value = T>,
S: Storage<T>,
impl<T, S> Copy for UseRwSignal<T, S>where
S: Storage<T>,
Auto Trait Implementations§
impl<T, S> Freeze for UseRwSignal<T, S>
impl<T, S> RefUnwindSafe for UseRwSignal<T, S>
impl<T, S> Send for UseRwSignal<T, S>
impl<T, S> Sync for UseRwSignal<T, S>
impl<T, S> Unpin for UseRwSignal<T, S>
impl<T, S> UnwindSafe for UseRwSignal<T, S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
Marker: ?Sized,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
Marker: ?Sized,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<T, V, E> IntoElementMaybeSignalType<T, OptionSignalMarker> for V
impl<T, V, E> IntoElementMaybeSignalType<T, OptionSignalMarker> for V
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<T, V, E> IntoElementMaybeSignalType<T, SignalMarker> for V
impl<T, V, E> IntoElementMaybeSignalType<T, SignalMarker> for V
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<T, V, I> IntoElementMaybeSignalType<T, SignalStrMarker> for V
impl<T, V, I> IntoElementMaybeSignalType<T, SignalStrMarker> for V
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
Marker: ?Sized,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
Marker: ?Sized,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T, V, E> IntoElementsMaybeSignalType<T, SignalMarker> for V
impl<T, V, E> IntoElementsMaybeSignalType<T, SignalMarker> for V
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T, V, I> IntoElementsMaybeSignalType<T, SignalStrMarker> for V
impl<T, V, I> IntoElementsMaybeSignalType<T, SignalStrMarker> for V
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T, Js, C, G> IntoElementsMaybeSignalType<T, SignalVecMarker> for G
impl<T, Js, C, G> IntoElementsMaybeSignalType<T, SignalVecMarker> for G
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T, Js, C, G> IntoElementsMaybeSignalType<T, SignalVecOptionMarker> for G
impl<T, Js, C, G> IntoElementsMaybeSignalType<T, SignalVecOptionMarker> for G
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.