pub struct RwSignal<T, S = SyncStorage> { /* private fields */ }Expand description
An arena-allocated signal that can be read from or written to.
A signal is a piece of data that may change over time, and notifies other code when it has changed. This is the atomic unit of reactivity, which begins all other processes of reactive updates.
This is an arena-allocated signal, which is Copy and is disposed when its reactive
Owner cleans up. For a reference-counted signal that lives
as long as a reference to it is alive, see ArcRwSignal.
§Core Trait Implementations
§Reading the Value
.get()clones the current value of the signal. If you call it within an effect, it will cause that effect to subscribe to the signal, and to re-run whenever the value of the signal changes..get_untracked()clones the value of the signal without reactively tracking it.
.read()returns a guard that allows accessing the value of the signal by reference. If you call it within an effect, it will cause that effect to subscribe to the signal, and to re-run whenever the value of the signal changes..read_untracked()gives access to the current value of the signal without reactively tracking it.
.with()allows you to reactively access the signal’s value without cloning by applying a callback function..with_untracked()allows you to access the signal’s value by applying a callback function without reactively tracking it.
.to_stream()converts the signal to anasyncstream of values.
§Updating the Value
.set()sets the signal to a new value..update()updates the value of the signal by applying a closure that takes a mutable reference..write()returns a guard through which the signal can be mutated, and which notifies subscribers when it is dropped.
Each of these has a related
_untracked()method, which updates the signal without notifying subscribers. Untracked updates are not desirable in most cases, as they cause “tearing” between the signal’s value and its observed value. If you want a non-reactive container, usedArenaIteminstead.
§Examples
let count = ArcRwSignal::new(0);
// ✅ calling the getter clones and returns the value
// this can be `count()` on nightly
assert_eq!(count.get(), 0);
// ✅ calling the setter sets the value
// this can be `set_count(1)` on nightly
count.set(1);
assert_eq!(count.get(), 1);
// ❌ you could call the getter within the setter
// set_count.set(count.get() + 1);
// ✅ however it's more efficient to use .update() and mutate the value in place
count.update(|count: &mut i32| *count += 1);
assert_eq!(count.get(), 2);
// ✅ you can create "derived signals" with a Fn() -> T interface
let double_count = {
// clone before moving into the closure because we use it below
let count = count.clone();
move || count.get() * 2
};
count.set(0);
assert_eq!(double_count(), 0);
count.set(1);
assert_eq!(double_count(), 2);Implementations§
Source§impl<T, S> RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
impl<T, S> RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
Sourcepub fn new_with_storage(value: T) -> RwSignal<T, S>
pub fn new_with_storage(value: T) -> RwSignal<T, S>
Creates a new signal with the given arena storage method.
Source§impl<T> RwSignal<T, LocalStorage>where
T: 'static,
impl<T> RwSignal<T, LocalStorage>where
T: 'static,
Sourcepub fn new_local(value: T) -> RwSignal<T, LocalStorage>
pub fn new_local(value: T) -> RwSignal<T, LocalStorage>
Creates a new signal, taking the initial value as its argument. Unlike RwSignal::new,
this pins the value to the current thread. Accessing it from any other thread will panic.
Source§impl<T, S> RwSignal<T, S>
impl<T, S> RwSignal<T, S>
Sourcepub fn read_only(&self) -> ReadSignal<T, S>
pub fn read_only(&self) -> ReadSignal<T, S>
Returns a read-only handle to the signal.
Source§impl<T, S> RwSignal<T, S>
impl<T, S> RwSignal<T, S>
Sourcepub fn write_only(&self) -> WriteSignal<T, S>
pub fn write_only(&self) -> WriteSignal<T, S>
Returns a write-only handle to the signal.
Source§impl<T, S> RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>> + Storage<ArcWriteSignal<T>> + Storage<ArcReadSignal<T>>,
impl<T, S> RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>> + Storage<ArcWriteSignal<T>> + Storage<ArcReadSignal<T>>,
Sourcepub fn split(&self) -> (ReadSignal<T, S>, WriteSignal<T, S>)
pub fn split(&self) -> (ReadSignal<T, S>, WriteSignal<T, S>)
Splits the signal into its readable and writable halves.
Sourcepub fn unite(
read: ReadSignal<T, S>,
write: WriteSignal<T, S>,
) -> Option<RwSignal<T, S>>
pub fn unite( read: ReadSignal<T, S>, write: WriteSignal<T, S>, ) -> Option<RwSignal<T, S>>
Reunites the two halves of a signal. Returns None if the two signals
provided were not created from the same signal.
Trait Implementations§
Source§impl<V, S> AddAnyAttr for RwSignal<V, S>
impl<V, S> AddAnyAttr for RwSignal<V, S>
Source§impl<V, S> AttributeValue for RwSignal<V, S>
impl<V, S> AttributeValue for RwSignal<V, S>
Source§type AsyncOutput = RwSignal<V, S>
type AsyncOutput = RwSignal<V, S>
Source§type State = RenderEffect<<V as AttributeValue>::State>
type State = RenderEffect<<V as AttributeValue>::State>
Source§type Cloneable = RwSignal<V, S>
type Cloneable = RwSignal<V, S>
FnMut() continues mutating the same
closure), but making a String cloneable does not necessarily need to make it an
Arc<str>, as two different clones of a String will still have the same value.Source§type CloneableOwned = RwSignal<V, S>
type CloneableOwned = RwSignal<V, S>
'static. This is used for spreading across types when the
spreadable attribute needs to be owned. In some cases (&'a str to Arc<str>, etc.) the owned
cloneable type has worse performance than the cloneable type, so they are separate.Source§fn to_template(_key: &str, _buf: &mut String)
fn to_template(_key: &str, _buf: &mut String)
<template>.Source§fn hydrate<const FROM_SERVER: bool>(
self,
key: &str,
el: &Element,
) -> <RwSignal<V, S> as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <RwSignal<V, S> as AttributeValue>::State
<template>.Source§fn build(
self,
el: &Element,
key: &str,
) -> <RwSignal<V, S> as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <RwSignal<V, S> as AttributeValue>::State
Source§fn rebuild(
self,
key: &str,
state: &mut <RwSignal<V, S> as AttributeValue>::State,
)
fn rebuild( self, key: &str, state: &mut <RwSignal<V, S> as AttributeValue>::State, )
Source§fn into_cloneable(self) -> <RwSignal<V, S> as AttributeValue>::Cloneable
fn into_cloneable(self) -> <RwSignal<V, S> as AttributeValue>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <RwSignal<V, S> as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <RwSignal<V, S> as AttributeValue>::CloneableOwned
'static.Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <RwSignal<V, S> as AttributeValue>::AsyncOutput
async fn resolve(self) -> <RwSignal<V, S> as AttributeValue>::AsyncOutput
Source§impl<T, S> DefinedAt for RwSignal<T, S>
impl<T, S> DefinedAt for RwSignal<T, S>
Source§fn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
None in
release mode.Source§impl<'de, T, S> Deserialize<'de> for RwSignal<T, S>
impl<'de, T, S> Deserialize<'de> for RwSignal<T, S>
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RwSignal<T, S>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RwSignal<T, S>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<'a, T> From<&'a ArcRwSignal<T>> for RwSignal<T>
impl<'a, T> From<&'a ArcRwSignal<T>> for RwSignal<T>
Source§fn from(value: &'a ArcRwSignal<T>) -> RwSignal<T>
fn from(value: &'a ArcRwSignal<T>) -> RwSignal<T>
Source§impl<T> From<ArcRwSignal<T>> for RwSignal<T>
impl<T> From<ArcRwSignal<T>> for RwSignal<T>
Source§fn from(value: ArcRwSignal<T>) -> RwSignal<T>
fn from(value: ArcRwSignal<T>) -> RwSignal<T>
Source§impl<T> From<RwSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<RwSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: RwSignal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: RwSignal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
Source§impl<T> From<RwSignal<T>> for MaybeSignal<T>
impl<T> From<RwSignal<T>> for MaybeSignal<T>
Source§fn from(value: RwSignal<T>) -> MaybeSignal<T>
fn from(value: RwSignal<T>) -> MaybeSignal<T>
Source§impl<T> From<RwSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<RwSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: RwSignal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: RwSignal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
Source§impl<T> From<RwSignal<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
impl<T> From<RwSignal<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
Source§fn from(value: RwSignal<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
fn from(value: RwSignal<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
Source§impl<T> From<RwSignal<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
impl<T> From<RwSignal<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
Source§fn from(value: RwSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: RwSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
Source§impl<T, S> From<RwSignal<T, S>> for ArcRwSignal<T>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
impl<T, S> From<RwSignal<T, S>> for ArcRwSignal<T>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
Source§fn from(value: RwSignal<T, S>) -> ArcRwSignal<T>
fn from(value: RwSignal<T, S>) -> ArcRwSignal<T>
Source§impl<T, S> From<RwSignal<T, S>> for SignalSetter<T, S>
impl<T, S> From<RwSignal<T, S>> for SignalSetter<T, S>
Source§fn from(value: RwSignal<T, S>) -> SignalSetter<T, S>
fn from(value: RwSignal<T, S>) -> SignalSetter<T, S>
Source§impl<T> FromLocal<ArcRwSignal<T>> for RwSignal<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcRwSignal<T>> for RwSignal<T, LocalStorage>where
T: 'static,
Source§fn from_local(value: ArcRwSignal<T>) -> RwSignal<T, LocalStorage>
fn from_local(value: ArcRwSignal<T>) -> RwSignal<T, LocalStorage>
Source§impl<V, S> InnerHtmlValue for RwSignal<V, S>
impl<V, S> InnerHtmlValue for RwSignal<V, S>
Source§type AsyncOutput = RwSignal<V, S>
type AsyncOutput = RwSignal<V, S>
Source§type State = RenderEffect<<V as InnerHtmlValue>::State>
type State = RenderEffect<<V as InnerHtmlValue>::State>
Source§type CloneableOwned = RwSignal<V, S>
type CloneableOwned = RwSignal<V, S>
'static.Source§fn to_template(_buf: &mut String)
fn to_template(_buf: &mut String)
<template>.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <RwSignal<V, S> as InnerHtmlValue>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <RwSignal<V, S> as InnerHtmlValue>::State
<template>.Source§fn build(self, el: &Element) -> <RwSignal<V, S> as InnerHtmlValue>::State
fn build(self, el: &Element) -> <RwSignal<V, S> as InnerHtmlValue>::State
Source§fn into_cloneable(self) -> <RwSignal<V, S> as InnerHtmlValue>::Cloneable
fn into_cloneable(self) -> <RwSignal<V, S> as InnerHtmlValue>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <RwSignal<V, S> as InnerHtmlValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <RwSignal<V, S> as InnerHtmlValue>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <RwSignal<V, S> as InnerHtmlValue>::AsyncOutput
async fn resolve(self) -> <RwSignal<V, S> as InnerHtmlValue>::AsyncOutput
Source§impl<V, S> IntoClass for RwSignal<V, S>
impl<V, S> IntoClass for RwSignal<V, S>
Source§type AsyncOutput = RwSignal<V, S>
type AsyncOutput = RwSignal<V, S>
Source§type State = RenderEffect<<V as IntoClass>::State>
type State = RenderEffect<<V as IntoClass>::State>
Source§type CloneableOwned = RwSignal<V, S>
type CloneableOwned = RwSignal<V, S>
'static.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <RwSignal<V, S> as IntoClass>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <RwSignal<V, S> as IntoClass>::State
<template>.Source§fn build(self, el: &Element) -> <RwSignal<V, S> as IntoClass>::State
fn build(self, el: &Element) -> <RwSignal<V, S> as IntoClass>::State
Source§fn into_cloneable(self) -> <RwSignal<V, S> as IntoClass>::Cloneable
fn into_cloneable(self) -> <RwSignal<V, S> as IntoClass>::Cloneable
Source§fn into_cloneable_owned(self) -> <RwSignal<V, S> as IntoClass>::CloneableOwned
fn into_cloneable_owned(self) -> <RwSignal<V, S> as IntoClass>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <RwSignal<V, S> as IntoClass>::AsyncOutput
async fn resolve(self) -> <RwSignal<V, S> as IntoClass>::AsyncOutput
Source§fn reset(state: &mut <RwSignal<V, S> as IntoClass>::State)
fn reset(state: &mut <RwSignal<V, S> as IntoClass>::State)
Source§const MIN_LENGTH: usize = _
const MIN_LENGTH: usize = _
Source§fn to_template(class: &mut String)
fn to_template(class: &mut String)
<template>.Source§impl<V, S> IntoProperty for RwSignal<V, S>
impl<V, S> IntoProperty for RwSignal<V, S>
Source§type State = RenderEffect<<V as IntoProperty>::State>
type State = RenderEffect<<V as IntoProperty>::State>
Source§type CloneableOwned = RwSignal<V, S>
type CloneableOwned = RwSignal<V, S>
'static.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
key: &str,
) -> <RwSignal<V, S> as IntoProperty>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <RwSignal<V, S> as IntoProperty>::State
Source§fn build(
self,
el: &Element,
key: &str,
) -> <RwSignal<V, S> as IntoProperty>::State
fn build( self, el: &Element, key: &str, ) -> <RwSignal<V, S> as IntoProperty>::State
Source§fn rebuild(self, state: &mut <RwSignal<V, S> as IntoProperty>::State, key: &str)
fn rebuild(self, state: &mut <RwSignal<V, S> as IntoProperty>::State, key: &str)
Source§fn into_cloneable(self) -> <RwSignal<V, S> as IntoProperty>::Cloneable
fn into_cloneable(self) -> <RwSignal<V, S> as IntoProperty>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <RwSignal<V, S> as IntoProperty>::CloneableOwned
fn into_cloneable_owned( self, ) -> <RwSignal<V, S> as IntoProperty>::CloneableOwned
Source§impl<T> IntoSplitSignal for RwSignal<T>
impl<T> IntoSplitSignal for RwSignal<T>
Source§type Read = ReadSignal<T>
type Read = ReadSignal<T>
Source§type Write = WriteSignal<T>
type Write = WriteSignal<T>
Source§fn into_split_signal(self) -> (ReadSignal<T>, WriteSignal<T>)
fn into_split_signal(self) -> (ReadSignal<T>, WriteSignal<T>)
Source§impl<V, S> IntoStyle for RwSignal<V, S>
impl<V, S> IntoStyle for RwSignal<V, S>
Source§type AsyncOutput = RwSignal<V, S>
type AsyncOutput = RwSignal<V, S>
Source§type State = RenderEffect<<V as IntoStyle>::State>
type State = RenderEffect<<V as IntoStyle>::State>
Source§type CloneableOwned = RwSignal<V, S>
type CloneableOwned = RwSignal<V, S>
'static.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <RwSignal<V, S> as IntoStyle>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <RwSignal<V, S> as IntoStyle>::State
<template>.Source§fn build(self, el: &Element) -> <RwSignal<V, S> as IntoStyle>::State
fn build(self, el: &Element) -> <RwSignal<V, S> as IntoStyle>::State
Source§fn into_cloneable(self) -> <RwSignal<V, S> as IntoStyle>::Cloneable
fn into_cloneable(self) -> <RwSignal<V, S> as IntoStyle>::Cloneable
Source§fn into_cloneable_owned(self) -> <RwSignal<V, S> as IntoStyle>::CloneableOwned
fn into_cloneable_owned(self) -> <RwSignal<V, S> as IntoStyle>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§impl<V, S> IntoStyleValue for RwSignal<V, S>
impl<V, S> IntoStyleValue for RwSignal<V, S>
Source§type AsyncOutput = RwSignal<V, S>
type AsyncOutput = RwSignal<V, S>
Source§type State = (Arc<str>, RenderEffect<<V as IntoStyleValue>::State>)
type State = (Arc<str>, RenderEffect<<V as IntoStyleValue>::State>)
Source§type CloneableOwned = RwSignal<V, S>
type CloneableOwned = RwSignal<V, S>
'static.Source§fn build(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <RwSignal<V, S> as IntoStyleValue>::State
fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <RwSignal<V, S> as IntoStyleValue>::State
Source§fn rebuild(
self,
style: &CssStyleDeclaration,
name: &str,
state: &mut <RwSignal<V, S> as IntoStyleValue>::State,
)
fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <RwSignal<V, S> as IntoStyleValue>::State, )
Source§fn hydrate(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <RwSignal<V, S> as IntoStyleValue>::State
fn hydrate( self, style: &CssStyleDeclaration, name: &str, ) -> <RwSignal<V, S> as IntoStyleValue>::State
<template>.Source§fn into_cloneable(self) -> <RwSignal<V, S> as IntoStyleValue>::Cloneable
fn into_cloneable(self) -> <RwSignal<V, S> as IntoStyleValue>::Cloneable
Source§fn into_cloneable_owned(
self,
) -> <RwSignal<V, S> as IntoStyleValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <RwSignal<V, S> as IntoStyleValue>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <RwSignal<V, S> as IntoStyleValue>::AsyncOutput
async fn resolve(self) -> <RwSignal<V, S> as IntoStyleValue>::AsyncOutput
Source§impl<T, S> IsDisposed for RwSignal<T, S>where
T: 'static,
impl<T, S> IsDisposed for RwSignal<T, S>where
T: 'static,
Source§fn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
true, the signal cannot be accessed without a panic.Source§impl<T, S> ReadUntracked for RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
impl<T, S> ReadUntracked for RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
Source§type Value = ReadGuard<T, Plain<T>>
type Value = ReadGuard<T, Plain<T>>
Source§fn try_read_untracked(&self) -> Option<<RwSignal<T, S> as ReadUntracked>::Value>
fn try_read_untracked(&self) -> Option<<RwSignal<T, S> as ReadUntracked>::Value>
None if the signal has already been disposed.Source§fn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
Source§fn custom_try_read(&self) -> Option<Option<Self::Value>>
fn custom_try_read(&self) -> Option<Option<Self::Value>>
Read::try_read implementation despite it being auto implemented. Read moreSource§impl<V, S> Render for RwSignal<V, S>
impl<V, S> Render for RwSignal<V, S>
Source§impl<V, S> RenderHtml for RwSignal<V, S>
impl<V, S> RenderHtml for RwSignal<V, S>
Source§const MIN_LENGTH: usize = 0
const MIN_LENGTH: usize = 0
Source§type AsyncOutput = RwSignal<V, S>
type AsyncOutput = RwSignal<V, S>
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <RwSignal<V, S> as RenderHtml>::AsyncOutput
async fn resolve(self) -> <RwSignal<V, S> as RenderHtml>::AsyncOutput
Source§fn html_len(&self) -> usize
fn html_len(&self) -> usize
Source§fn to_html_with_buf(
self,
buf: &mut String,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)
fn to_html_with_buf( self, buf: &mut String, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )
Source§fn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)
fn to_html_async_with_buf<const OUT_OF_ORDER: bool>( self, buf: &mut StreamBuilder, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )
Source§fn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <RwSignal<V, S> as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <RwSignal<V, S> as Render>::State
Source§fn into_owned(self) -> <RwSignal<V, S> as RenderHtml>::Owned
fn into_owned(self) -> <RwSignal<V, S> as RenderHtml>::Owned
'static.Source§const EXISTS: bool = true
const EXISTS: bool = true
Source§fn to_html_branching(self) -> Stringwhere
Self: Sized,
fn to_html_branching(self) -> Stringwhere
Self: Sized,
Source§fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
Source§fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
Source§fn hydrate_async(
self,
cursor: &Cursor,
position: &PositionState,
) -> impl Future<Output = Self::State>
fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> impl Future<Output = Self::State>
Source§fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
RenderHtml::hydrate, beginning at the given element.Source§fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
RenderHtml::hydrate, beginning at the given element and position.Source§impl<T, St> Serialize for RwSignal<T, St>
impl<T, St> Serialize for RwSignal<T, St>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl<T, S> Write for RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
impl<T, S> Write for RwSignal<T, S>where
T: 'static,
S: Storage<ArcRwSignal<T>>,
Source§fn try_write(&self) -> Option<impl UntrackableGuard>
fn try_write(&self) -> Option<impl UntrackableGuard>
None if the signal has already been disposed.Source§fn try_write_untracked(
&self,
) -> Option<UntrackedWriteGuard<<RwSignal<T, S> as Write>::Value>>
fn try_write_untracked( &self, ) -> Option<UntrackedWriteGuard<<RwSignal<T, S> as Write>::Value>>
None if the signal has already been disposed.Source§fn write(&self) -> impl UntrackableGuard
fn write(&self) -> impl UntrackableGuard
Source§fn write_untracked(&self) -> impl DerefMut
fn write_untracked(&self) -> impl DerefMut
impl<T, S> Copy for RwSignal<T, S>
impl<T, S> Eq for RwSignal<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for RwSignal<T, S>
impl<T, S> RefUnwindSafe for RwSignal<T, S>
impl<T, S> Send for RwSignal<T, S>
impl<T, S> Sync for RwSignal<T, S>
impl<T, S> Unpin for RwSignal<T, S>
impl<T, S> UnwindSafe for RwSignal<T, S>
Blanket Implementations§
Source§impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
Source§type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, K, V> CustomAttribute<K, V> for T
impl<T, K, V> CustomAttribute<K, V> for T
Source§fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>
fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>
Source§impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
Source§type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
Source§fn directive(
self,
handler: D,
param: P,
) -> <V as DirectiveAttribute<T, P, D>>::Output
fn directive( self, handler: D, param: P, ) -> <V as DirectiveAttribute<T, P, D>>::Output
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
Source§fn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
submit event.Source§impl<T> IntoAny for Twhere
T: Send + RenderHtml,
impl<T> IntoAny for Twhere
T: Send + RenderHtml,
Source§impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
Source§fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
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>
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>
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<T> IntoMaybeErased for Twhere
T: RenderHtml,
impl<T> IntoMaybeErased for Twhere
T: RenderHtml,
Source§fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
Source§impl<T, S> IntoOptionGetter<T, SignalMarker> for S
impl<T, S> IntoOptionGetter<T, SignalMarker> for S
Source§fn into_option_getter(self) -> OptionGetter<T>
fn into_option_getter(self) -> OptionGetter<T>
OptionGetter.Source§impl<T> IntoRender for Twhere
T: Render,
impl<T> IntoRender for Twhere
T: Render,
Source§fn into_render(self) -> <T as IntoRender>::Output
fn into_render(self) -> <T as IntoRender>::Output
Source§impl<T> ReactiveNode for Twhere
T: AsSubscriberSet + DefinedAt,
impl<T> ReactiveNode for Twhere
T: AsSubscriberSet + DefinedAt,
Source§fn mark_dirty(&self)
fn mark_dirty(&self)
Source§fn mark_check(&self)
fn mark_check(&self)
Source§fn mark_subscribers_check(&self)
fn mark_subscribers_check(&self)
Source§fn update_if_necessary(&self) -> bool
fn update_if_necessary(&self) -> bool
Source§impl<T> Read for Twhere
T: Track + ReadUntracked,
impl<T> Read for Twhere
T: Track + ReadUntracked,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> Set for Twhere
T: Update + IsDisposed,
impl<T> Set for Twhere
T: Update + IsDisposed,
Source§impl<T> Source for Twhere
T: AsSubscriberSet + DefinedAt,
impl<T> Source for Twhere
T: AsSubscriberSet + DefinedAt,
Source§fn clear_subscribers(&self)
fn clear_subscribers(&self)
Source§fn add_subscriber(&self, subscriber: AnySubscriber)
fn add_subscriber(&self, subscriber: AnySubscriber)
Source§fn remove_subscriber(&self, subscriber: &AnySubscriber)
fn remove_subscriber(&self, subscriber: &AnySubscriber)
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Source§impl<T> Update for Twhere
T: Write,
impl<T> Update for Twhere
T: Write,
Source§fn try_maybe_update<U>(
&self,
fun: impl FnOnce(&mut <T as Update>::Value) -> (bool, U),
) -> Option<U>
fn try_maybe_update<U>( &self, fun: impl FnOnce(&mut <T as Update>::Value) -> (bool, U), ) -> Option<U>
(true, _), and returns the value returned by the update function,
or None if the signal has already been disposed.Source§fn update(&self, fun: impl FnOnce(&mut Self::Value))
fn update(&self, fun: impl FnOnce(&mut Self::Value))
Source§impl<T> UpdateUntracked for Twhere
T: Write,
impl<T> UpdateUntracked for Twhere
T: Write,
Source§fn try_update_untracked<U>(
&self,
fun: impl FnOnce(&mut <T as UpdateUntracked>::Value) -> U,
) -> Option<U>
fn try_update_untracked<U>( &self, fun: impl FnOnce(&mut <T as UpdateUntracked>::Value) -> U, ) -> Option<U>
None if the signal has already been disposed.
Does not notify subscribers that the signal has changed.Source§impl<T> With for Twhere
T: Read,
impl<T> With for Twhere
T: Read,
Source§type Value = <<T as Read>::Value as Deref>::Target
type Value = <<T as Read>::Value as Deref>::Target
Source§impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
Source§type Value = <<T as ReadUntracked>::Value as Deref>::Target
type Value = <<T as ReadUntracked>::Value as Deref>::Target
Source§fn try_with_untracked<U>(
&self,
fun: impl FnOnce(&<T as WithUntracked>::Value) -> U,
) -> Option<U>
fn try_with_untracked<U>( &self, fun: impl FnOnce(&<T as WithUntracked>::Value) -> U, ) -> Option<U>
None if the signal has already been disposed.