Struct Signal
pub struct Signal<T, S = SyncStorage>where
S: Storage<T>,{
inner: ArenaItem<SignalTypes<T, S>, S>,
}Expand description
A wrapper for any kind of arena-allocated reactive signal:
a ReadSignal, Memo, RwSignal, or derived signal closure,
or a plain value of the same type
This allows you to create APIs that take T or any reactive value that returns T
as an argument, rather than adding a generic F: Fn() -> T.
Values can be accessed with the same function call, read(), with(), and get()
APIs as other signals.
ยงImportant Notes about Derived Signals
Signal::derive() is simply a way to box and type-erase a โderived signal,โ which
is a plain closure that accesses one or more signals. It does not cache the value
of that computation. Accessing the value of a Signal<_> that is created using Signal::derive()
will run the closure again every time you call .read(), .with(), or .get().
If you want the closure to run the minimal number of times necessary to update its state,
and then to cache its value, you should use a Memo (and convert it into a Signal<_>)
rather than using Signal::derive().
Note that for many computations, it is nevertheless less expensive to use a derived signal than to create a separate memo and to cache the value: creating a new reactive node and taking the lock on that cached value whenever you access the signal is more expensive than simply re-running the calculation in many cases.
Fieldsยง
ยงinner: ArenaItem<SignalTypes<T, S>, S>Implementationsยง
ยงimpl<T> Signal<T>
impl<T> Signal<T>
pub fn derive(
derived_signal: impl Fn() -> T + Send + Sync + 'static,
) -> Signal<T>
pub fn derive( derived_signal: impl Fn() -> T + Send + Sync + 'static, ) -> Signal<T>
Wraps a derived signal, i.e., any computation that accesses one or more reactive signals.
let (count, set_count) = signal(2);
let double_count = Signal::derive(move || count.get() * 2);
// this function takes any kind of wrapped signal
fn above_3(arg: &Signal<i32>) -> bool {
arg.get() > 3
}
assert_eq!(above_3(&count.into()), false);
assert_eq!(above_3(&double_count), true);pub fn stored(value: T) -> Signal<T>
pub fn stored(value: T) -> Signal<T>
Moves a static, nonreactive value into a signal, backed by ArcStoredValue.
ยงimpl<T> Signal<T, LocalStorage>where
T: 'static,
impl<T> Signal<T, LocalStorage>where
T: 'static,
pub fn derive_local(
derived_signal: impl Fn() -> T + 'static,
) -> Signal<T, LocalStorage>
pub fn derive_local( derived_signal: impl Fn() -> T + 'static, ) -> Signal<T, LocalStorage>
Wraps a derived signal. Works like Signal::derive but uses LocalStorage.
pub fn stored_local(value: T) -> Signal<T, LocalStorage>
pub fn stored_local(value: T) -> Signal<T, LocalStorage>
Moves a static, nonreactive value into a signal, backed by ArcStoredValue.
Works like Signal::stored but uses LocalStorage.
Trait Implementationsยง
ยงimpl<V, S> AddAnyAttr for Signal<V, S>
impl<V, S> AddAnyAttr for Signal<V, S>
ยงfn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <Signal<V, S> as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
fn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <Signal<V, S> as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
ยงimpl<V, S> AttributeValue for Signal<V, S>
impl<V, S> AttributeValue for Signal<V, S>
ยงtype AsyncOutput = Signal<V, S>
type AsyncOutput = Signal<V, S>
ยงtype State = RenderEffect<<V as AttributeValue>::State>
type State = RenderEffect<<V as AttributeValue>::State>
ยงtype Cloneable = Signal<V, S>
type Cloneable = Signal<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.ยงtype CloneableOwned = Signal<V, S>
type CloneableOwned = Signal<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.ยงfn to_template(_key: &str, _buf: &mut String)
fn to_template(_key: &str, _buf: &mut String)
<template>.ยงfn hydrate<const FROM_SERVER: bool>(
self,
key: &str,
el: &Element,
) -> <Signal<V, S> as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <Signal<V, S> as AttributeValue>::State
<template>.ยงfn build(
self,
el: &Element,
key: &str,
) -> <Signal<V, S> as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <Signal<V, S> as AttributeValue>::State
ยงfn rebuild(self, key: &str, state: &mut <Signal<V, S> as AttributeValue>::State)
fn rebuild(self, key: &str, state: &mut <Signal<V, S> as AttributeValue>::State)
ยงfn into_cloneable(self) -> <Signal<V, S> as AttributeValue>::Cloneable
fn into_cloneable(self) -> <Signal<V, S> as AttributeValue>::Cloneable
ยงfn into_cloneable_owned(
self,
) -> <Signal<V, S> as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Signal<V, S> as AttributeValue>::CloneableOwned
'static.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงimpl<T> Default for Signal<T, LocalStorage>where
T: Default + 'static,
impl<T> Default for Signal<T, LocalStorage>where
T: Default + 'static,
ยงfn default() -> Signal<T, LocalStorage>
fn default() -> Signal<T, LocalStorage>
ยงimpl<T, S> DefinedAt for Signal<T, S>where
S: Storage<T>,
impl<T, S> DefinedAt for Signal<T, S>where
S: Storage<T>,
ยงfn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
None in
release mode.ยงimpl<T> From<ArcMappedSignal<T>> for Signal<T>
impl<T> From<ArcMappedSignal<T>> for Signal<T>
ยงfn from(value: ArcMappedSignal<T>) -> Signal<T>
fn from(value: ArcMappedSignal<T>) -> Signal<T>
ยงimpl<T> From<ArcMemo<T, LocalStorage>> for Signal<T, LocalStorage>
impl<T> From<ArcMemo<T, LocalStorage>> for Signal<T, LocalStorage>
ยงfn from(value: ArcMemo<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: ArcMemo<T, LocalStorage>) -> Signal<T, LocalStorage>
ยงimpl<T> From<ArcReadSignal<T>> for Signal<T>
impl<T> From<ArcReadSignal<T>> for Signal<T>
ยงfn from(value: ArcReadSignal<T>) -> Signal<T>
fn from(value: ArcReadSignal<T>) -> Signal<T>
ยงimpl<T> From<ArcReadSignal<T>> for Signal<T, LocalStorage>
impl<T> From<ArcReadSignal<T>> for Signal<T, LocalStorage>
ยงfn from(value: ArcReadSignal<T>) -> Signal<T, LocalStorage>
fn from(value: ArcReadSignal<T>) -> Signal<T, LocalStorage>
ยงimpl<T> From<ArcRwSignal<T>> for Signal<T>
impl<T> From<ArcRwSignal<T>> for Signal<T>
ยงfn from(value: ArcRwSignal<T>) -> Signal<T>
fn from(value: ArcRwSignal<T>) -> Signal<T>
ยงimpl<T> From<ArcRwSignal<T>> for Signal<T, LocalStorage>
impl<T> From<ArcRwSignal<T>> for Signal<T, LocalStorage>
ยงfn from(value: ArcRwSignal<T>) -> Signal<T, LocalStorage>
fn from(value: ArcRwSignal<T>) -> Signal<T, LocalStorage>
ยงimpl<T> From<MappedSignal<T>> for Signal<T>
impl<T> From<MappedSignal<T>> for Signal<T>
ยงfn from(value: MappedSignal<T>) -> Signal<T>
fn from(value: MappedSignal<T>) -> Signal<T>
ยงimpl<T> From<MaybeSignal<T>> for Signal<Option<T>>
impl<T> From<MaybeSignal<T>> for Signal<Option<T>>
ยงfn from(value: MaybeSignal<T>) -> Signal<Option<T>>
fn from(value: MaybeSignal<T>) -> Signal<Option<T>>
ยงimpl<T> From<MaybeSignal<T>> for Signal<T>
impl<T> From<MaybeSignal<T>> for Signal<T>
ยงfn from(value: MaybeSignal<T>) -> Signal<T>
fn from(value: MaybeSignal<T>) -> Signal<T>
ยงimpl<T> From<MaybeSignal<T, LocalStorage>> for Signal<Option<T>, LocalStorage>
impl<T> From<MaybeSignal<T, LocalStorage>> for Signal<Option<T>, LocalStorage>
ยงfn from(value: MaybeSignal<T, LocalStorage>) -> Signal<Option<T>, LocalStorage>
fn from(value: MaybeSignal<T, LocalStorage>) -> Signal<Option<T>, LocalStorage>
ยงimpl<T> From<MaybeSignal<T, LocalStorage>> for Signal<T, LocalStorage>
impl<T> From<MaybeSignal<T, LocalStorage>> for Signal<T, LocalStorage>
ยงfn from(value: MaybeSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: MaybeSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
ยงimpl<T> From<Memo<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
impl<T> From<Memo<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
ยงfn from(value: Memo<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: Memo<T, LocalStorage>) -> Signal<T, LocalStorage>
ยงimpl<T> From<ReadSignal<T>> for Signal<T>
impl<T> From<ReadSignal<T>> for Signal<T>
ยงfn from(value: ReadSignal<T>) -> Signal<T>
fn from(value: ReadSignal<T>) -> Signal<T>
ยงimpl<T> From<ReadSignal<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
impl<T> From<ReadSignal<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
ยงfn from(value: ReadSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: ReadSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
ยง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,
ยงfn from(value: RwSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: RwSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
ยงimpl From<Signal<&'static str, LocalStorage>> for Signal<String, LocalStorage>
impl From<Signal<&'static str, LocalStorage>> for Signal<String, LocalStorage>
ยงfn from(
value: Signal<&'static str, LocalStorage>,
) -> Signal<String, LocalStorage>
fn from( value: Signal<&'static str, LocalStorage>, ) -> Signal<String, LocalStorage>
ยงimpl From<Signal<Option<&'static str>, LocalStorage>> for Signal<Option<String>, LocalStorage>
impl From<Signal<Option<&'static str>, LocalStorage>> for Signal<Option<String>, LocalStorage>
ยงfn from(
value: Signal<Option<&'static str>, LocalStorage>,
) -> Signal<Option<String>, LocalStorage>
fn from( value: Signal<Option<&'static str>, LocalStorage>, ) -> Signal<Option<String>, LocalStorage>
ยงimpl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
ยงimpl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
ยงimpl<T> From<Signal<T, LocalStorage>> for Signal<Option<T>, LocalStorage>where
T: Clone + 'static,
impl<T> From<Signal<T, LocalStorage>> for Signal<Option<T>, LocalStorage>where
T: Clone + 'static,
ยงfn from(value: Signal<T, LocalStorage>) -> Signal<Option<T>, LocalStorage>
fn from(value: Signal<T, LocalStorage>) -> Signal<Option<T>, LocalStorage>
ยงimpl<T, S> From<Signal<T, S>> for MaybeSignal<T, S>where
S: Storage<T>,
impl<T, S> From<Signal<T, S>> for MaybeSignal<T, S>where
S: Storage<T>,
ยงfn from(value: Signal<T, S>) -> MaybeSignal<T, S>
fn from(value: Signal<T, S>) -> MaybeSignal<T, S>
ยงimpl<T> From<T> for Signal<Option<T>, LocalStorage>where
T: 'static,
impl<T> From<T> for Signal<Option<T>, LocalStorage>where
T: 'static,
ยงfn from(value: T) -> Signal<Option<T>, LocalStorage>
fn from(value: T) -> Signal<Option<T>, LocalStorage>
ยงimpl<T> From<T> for Signal<T, LocalStorage>where
T: 'static,
impl<T> From<T> for Signal<T, LocalStorage>where
T: 'static,
ยงfn from(value: T) -> Signal<T, LocalStorage>
fn from(value: T) -> Signal<T, LocalStorage>
ยงimpl<T> FromLocal<ArcSignal<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcSignal<T, LocalStorage>> for Signal<T, LocalStorage>where
T: 'static,
ยงfn from_local(value: ArcSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from_local(value: ArcSignal<T, LocalStorage>) -> Signal<T, LocalStorage>
ยงimpl<V, S> InnerHtmlValue for Signal<V, S>
impl<V, S> InnerHtmlValue for Signal<V, S>
ยงtype AsyncOutput = Signal<V, S>
type AsyncOutput = Signal<V, S>
ยงtype State = RenderEffect<<V as InnerHtmlValue>::State>
type State = RenderEffect<<V as InnerHtmlValue>::State>
ยงtype CloneableOwned = Signal<V, S>
type CloneableOwned = Signal<V, S>
'static.ยงfn to_template(_buf: &mut String)
fn to_template(_buf: &mut String)
<template>.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <Signal<V, S> as InnerHtmlValue>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <Signal<V, S> as InnerHtmlValue>::State
<template>.ยงfn build(self, el: &Element) -> <Signal<V, S> as InnerHtmlValue>::State
fn build(self, el: &Element) -> <Signal<V, S> as InnerHtmlValue>::State
ยงfn into_cloneable(self) -> <Signal<V, S> as InnerHtmlValue>::Cloneable
fn into_cloneable(self) -> <Signal<V, S> as InnerHtmlValue>::Cloneable
ยงfn into_cloneable_owned(
self,
) -> <Signal<V, S> as InnerHtmlValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Signal<V, S> as InnerHtmlValue>::CloneableOwned
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงimpl<V, S> IntoClass for Signal<V, S>
impl<V, S> IntoClass for Signal<V, S>
ยงtype AsyncOutput = Signal<V, S>
type AsyncOutput = Signal<V, S>
ยงtype State = RenderEffect<<V as IntoClass>::State>
type State = RenderEffect<<V as IntoClass>::State>
ยงtype CloneableOwned = Signal<V, S>
type CloneableOwned = Signal<V, S>
'static.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <Signal<V, S> as IntoClass>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <Signal<V, S> as IntoClass>::State
<template>.ยงfn build(self, el: &Element) -> <Signal<V, S> as IntoClass>::State
fn build(self, el: &Element) -> <Signal<V, S> as IntoClass>::State
ยงfn into_cloneable(self) -> <Signal<V, S> as IntoClass>::Cloneable
fn into_cloneable(self) -> <Signal<V, S> as IntoClass>::Cloneable
ยงfn into_cloneable_owned(self) -> <Signal<V, S> as IntoClass>::CloneableOwned
fn into_cloneable_owned(self) -> <Signal<V, S> as IntoClass>::CloneableOwned
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <Signal<V, S> as IntoClass>::AsyncOutput
async fn resolve(self) -> <Signal<V, S> as IntoClass>::AsyncOutput
ยงfn reset(state: &mut <Signal<V, S> as IntoClass>::State)
fn reset(state: &mut <Signal<V, S> as IntoClass>::State)
ยงconst MIN_LENGTH: usize = _
const MIN_LENGTH: usize = _
ยงfn should_overwrite(&self) -> bool
fn should_overwrite(&self) -> bool
true for class="..." attributes, false for class:name=value directives.ยงfn to_template(class: &mut String)
fn to_template(class: &mut String)
<template>.ยงimpl<V, S> IntoProperty for Signal<V, S>
impl<V, S> IntoProperty for Signal<V, S>
ยงtype State = RenderEffect<<V as IntoProperty>::State>
type State = RenderEffect<<V as IntoProperty>::State>
ยงtype CloneableOwned = Signal<V, S>
type CloneableOwned = Signal<V, S>
'static.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
key: &str,
) -> <Signal<V, S> as IntoProperty>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <Signal<V, S> as IntoProperty>::State
ยงfn build(self, el: &Element, key: &str) -> <Signal<V, S> as IntoProperty>::State
fn build(self, el: &Element, key: &str) -> <Signal<V, S> as IntoProperty>::State
ยงfn rebuild(self, state: &mut <Signal<V, S> as IntoProperty>::State, key: &str)
fn rebuild(self, state: &mut <Signal<V, S> as IntoProperty>::State, key: &str)
ยงfn into_cloneable(self) -> <Signal<V, S> as IntoProperty>::Cloneable
fn into_cloneable(self) -> <Signal<V, S> as IntoProperty>::Cloneable
ยงfn into_cloneable_owned(self) -> <Signal<V, S> as IntoProperty>::CloneableOwned
fn into_cloneable_owned(self) -> <Signal<V, S> as IntoProperty>::CloneableOwned
ยงimpl<V, S> IntoStyle for Signal<V, S>
impl<V, S> IntoStyle for Signal<V, S>
ยงtype AsyncOutput = Signal<V, S>
type AsyncOutput = Signal<V, S>
ยงtype State = RenderEffect<<V as IntoStyle>::State>
type State = RenderEffect<<V as IntoStyle>::State>
ยงtype CloneableOwned = Signal<V, S>
type CloneableOwned = Signal<V, S>
'static.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <Signal<V, S> as IntoStyle>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <Signal<V, S> as IntoStyle>::State
<template>.ยงfn build(self, el: &Element) -> <Signal<V, S> as IntoStyle>::State
fn build(self, el: &Element) -> <Signal<V, S> as IntoStyle>::State
ยงfn into_cloneable(self) -> <Signal<V, S> as IntoStyle>::Cloneable
fn into_cloneable(self) -> <Signal<V, S> as IntoStyle>::Cloneable
ยงfn into_cloneable_owned(self) -> <Signal<V, S> as IntoStyle>::CloneableOwned
fn into_cloneable_owned(self) -> <Signal<V, S> as IntoStyle>::CloneableOwned
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงimpl<V, S> IntoStyleValue for Signal<V, S>
impl<V, S> IntoStyleValue for Signal<V, S>
ยงtype AsyncOutput = Signal<V, S>
type AsyncOutput = Signal<V, S>
ยงtype State = (Arc<str>, RenderEffect<<V as IntoStyleValue>::State>)
type State = (Arc<str>, RenderEffect<<V as IntoStyleValue>::State>)
ยงtype CloneableOwned = Signal<V, S>
type CloneableOwned = Signal<V, S>
'static.ยงfn build(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <Signal<V, S> as IntoStyleValue>::State
fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <Signal<V, S> as IntoStyleValue>::State
ยงfn rebuild(
self,
style: &CssStyleDeclaration,
name: &str,
state: &mut <Signal<V, S> as IntoStyleValue>::State,
)
fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <Signal<V, S> as IntoStyleValue>::State, )
ยงfn hydrate(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <Signal<V, S> as IntoStyleValue>::State
fn hydrate( self, style: &CssStyleDeclaration, name: &str, ) -> <Signal<V, S> as IntoStyleValue>::State
<template>.ยงfn into_cloneable(self) -> <Signal<V, S> as IntoStyleValue>::Cloneable
fn into_cloneable(self) -> <Signal<V, S> as IntoStyleValue>::Cloneable
ยงfn into_cloneable_owned(
self,
) -> <Signal<V, S> as IntoStyleValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <Signal<V, S> as IntoStyleValue>::CloneableOwned
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงimpl<T, S> ReadUntracked for Signal<T, S>
impl<T, S> ReadUntracked for Signal<T, S>
ยงfn custom_try_read(
&self,
) -> Option<Option<<Signal<T, S> as ReadUntracked>::Value>>
fn custom_try_read( &self, ) -> Option<Option<<Signal<T, S> as ReadUntracked>::Value>>
Overriding the default auto implemented Read::try_read to combine read and track,
to avoid 2 clones and just have 1 in the SignalTypes::DerivedSignal.
ยงtype Value = ReadGuard<T, SignalReadGuard<T, S>>
type Value = ReadGuard<T, SignalReadGuard<T, S>>
ยงfn try_read_untracked(&self) -> Option<<Signal<T, S> as ReadUntracked>::Value>
fn try_read_untracked(&self) -> Option<<Signal<T, S> as ReadUntracked>::Value>
None if the signal has already been disposed.ยงfn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
ยงimpl<V, S> Render for Signal<V, S>
impl<V, S> Render for Signal<V, S>
ยงimpl<V, S> RenderHtml for Signal<V, S>
impl<V, S> RenderHtml for Signal<V, S>
ยงconst MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
ยงtype AsyncOutput = Signal<V, S>
type AsyncOutput = Signal<V, S>
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
ยงasync fn resolve(self) -> <Signal<V, S> as RenderHtml>::AsyncOutput
async fn resolve(self) -> <Signal<V, S> as RenderHtml>::AsyncOutput
ยง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>, )
ยง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>, )
ยงfn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <Signal<V, S> as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <Signal<V, S> as Render>::State
ยงfn into_owned(self) -> <Signal<V, S> as RenderHtml>::Owned
fn into_owned(self) -> <Signal<V, S> as RenderHtml>::Owned
'static.ยงconst EXISTS: bool = true
const EXISTS: bool = true
ยงfn to_html_branching(self) -> Stringwhere
Self: Sized,
fn to_html_branching(self) -> Stringwhere
Self: Sized,
ยงfn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
ยงfn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
ยง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>
ยง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.ยง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.ยงimpl<T, St> Serialize for Signal<T, St>
impl<T, St> Serialize for Signal<T, St>
ยง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,
impl<T, S> Copy for Signal<T, S>where
S: Storage<T>,
impl<T, S> Eq for Signal<T, S>where
S: Storage<T>,
Auto Trait Implementationsยง
impl<T, S> Freeze for Signal<T, S>
impl<T, S> RefUnwindSafe for Signal<T, S>
impl<T, S> Send for Signal<T, S>
impl<T, S> Sync for Signal<T, S>
impl<T, S> Unpin for Signal<T, S>
impl<T, S> UnwindSafe for Signal<T, S>
Blanket Implementationsยง
Sourceยงimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Sourceยงfn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
Sourceยงimpl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Sourceยงfn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Sourceยงimpl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Sourceยงfn arrays_into(self) -> C
fn arrays_into(self) -> C
ยง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>,
ยง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>>
ยงfn bind(
self,
key: Key,
signal: Sig,
) -> <V as BindAttribute<Key, Sig, T>>::Output
fn bind( self, key: Key, signal: Sig, ) -> <V as BindAttribute<Key, Sig, T>>::Output
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Sourceยงtype Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Sourceยงfn components_from(colors: C) -> T
fn components_from(colors: C) -> T
ยงimpl<T, K, V> CustomAttribute<K, V> for Twhere
T: AddAnyAttr,
K: CustomAttributeKey,
V: AttributeValue,
impl<T, K, V> CustomAttribute<K, V> for Twhere
T: AddAnyAttr,
K: CustomAttributeKey,
V: AttributeValue,
ยงimpl<V, T, P, D> DirectiveAttribute<T, P, D> for Vwhere
V: AddAnyAttr,
D: IntoDirective<T, P>,
P: Clone + 'static,
T: 'static,
impl<V, T, P, D> DirectiveAttribute<T, P, D> for Vwhere
V: AddAnyAttr,
D: IntoDirective<T, P>,
P: Clone + 'static,
T: 'static,
ยงtype Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
ยง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
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Sourceยงimpl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Sourceยงfn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.ยงimpl<E, T, Request> FromReq<StreamingText, Request, E> for T
impl<E, T, Request> FromReq<StreamingText, Request, E> for T
Sourceยงimpl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Sourceยงfn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.ยงimpl<S, T> FromStream<T> for S
impl<S, T> FromStream<T> for S
ยงfn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S
fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S
ยงfn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S
fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S
ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงimpl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Sourceยงfn into_angle(self) -> U
fn into_angle(self) -> U
T.ยงimpl<T> IntoAny for Twhere
T: Send + RenderHtml,
impl<T> IntoAny for Twhere
T: Send + RenderHtml,
ยงimpl<T> IntoAttributeValue for Twhere
T: AttributeValue,
impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
ยงfn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
Sourceยงimpl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Sourceยงtype Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Sourceยงfn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Sourceยงimpl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Sourceยงfn into_color(self) -> U
fn into_color(self) -> U
Sourceยงimpl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Sourceยงfn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
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 moreยงimpl<T> IntoMaybeErased for Twhere
T: RenderHtml,
impl<T> IntoMaybeErased for Twhere
T: RenderHtml,
ยงfn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
ยงimpl<T, S> IntoOptionGetter<T, SignalMarker> for S
impl<T, S> IntoOptionGetter<T, SignalMarker> for S
ยงfn into_option_getter(self) -> OptionGetter<T>
fn into_option_getter(self) -> OptionGetter<T>
OptionGetter.ยงimpl<T, F> IntoReactiveValue<Signal<Option<T>>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for F
impl<T, F> IntoReactiveValue<Signal<Option<T>>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for F
ยงfn into_reactive_value(self) -> Signal<Option<T>>
fn into_reactive_value(self) -> Signal<Option<T>>
self into a T.ยงimpl<T, F> IntoReactiveValue<Signal<Option<T>, LocalStorage>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for Fwhere
T: 'static,
F: Fn() -> T + 'static,
impl<T, F> IntoReactiveValue<Signal<Option<T>, LocalStorage>, __IntoReactiveValueMarkerOptionalSignalFromReactiveClosureAlways> for Fwhere
T: 'static,
F: Fn() -> T + 'static,
ยงfn into_reactive_value(self) -> Signal<Option<T>, LocalStorage>
fn into_reactive_value(self) -> Signal<Option<T>, LocalStorage>
self into a T.ยงimpl<F> IntoReactiveValue<Signal<String>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
impl<F> IntoReactiveValue<Signal<String>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
ยงfn into_reactive_value(self) -> Signal<String>
fn into_reactive_value(self) -> Signal<String>
self into a T.ยงimpl<F> IntoReactiveValue<Signal<String, LocalStorage>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
impl<F> IntoReactiveValue<Signal<String, LocalStorage>, __IntoReactiveValueMarkerSignalStrOutputToString> for F
ยงfn into_reactive_value(self) -> Signal<String, LocalStorage>
fn into_reactive_value(self) -> Signal<String, LocalStorage>
self into a T.ยงimpl<T, F> IntoReactiveValue<Signal<T>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for F
impl<T, F> IntoReactiveValue<Signal<T>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for F
ยงfn into_reactive_value(self) -> Signal<T>
fn into_reactive_value(self) -> Signal<T>
self into a T.ยงimpl<T, F> IntoReactiveValue<Signal<T, LocalStorage>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for Fwhere
T: 'static,
F: Fn() -> T + 'static,
impl<T, F> IntoReactiveValue<Signal<T, LocalStorage>, __IntoReactiveValueMarkerSignalFromReactiveClosure> for Fwhere
T: 'static,
F: Fn() -> T + 'static,
ยงfn into_reactive_value(self) -> Signal<T, LocalStorage>
fn into_reactive_value(self) -> Signal<T, LocalStorage>
self into a T.ยงimpl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for Iwhere
I: Into<T>,
impl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for Iwhere
I: Into<T>,
ยงfn into_reactive_value(self) -> T
fn into_reactive_value(self) -> T
self into a T.ยงimpl<T> IntoRender for Twhere
T: Render,
impl<T> IntoRender for Twhere
T: Render,
ยงfn into_render(self) -> <T as IntoRender>::Output
fn into_render(self) -> <T as IntoRender>::Output
Sourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<T> Read for Twhere
T: Track + ReadUntracked,
impl<T> Read for Twhere
T: Track + ReadUntracked,
ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Sourceยงimpl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Sourceยงtype Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Sourceยงfn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Sourceยงimpl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Sourceยงfn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read moreSourceยงimpl<C, U> UintsFrom<C> for Uwhere
C: IntoUints<U>,
impl<C, U> UintsFrom<C> for Uwhere
C: IntoUints<U>,
Sourceยงfn uints_from(colors: C) -> U
fn uints_from(colors: C) -> U
Sourceยงimpl<C, U> UintsInto<C> for Uwhere
C: FromUints<U>,
impl<C, U> UintsInto<C> for Uwhere
C: FromUints<U>,
Sourceยงfn uints_into(self) -> C
fn uints_into(self) -> C
ยงimpl<T> With for Twhere
T: Read,
impl<T> With for Twhere
T: Read,
ยงimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
ยงfn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โwhere
S: Into<Dispatch>,
ยงfn with_current_subscriber(self) -> WithDispatch<Self> โ
fn with_current_subscriber(self) -> WithDispatch<Self> โ
ยงimpl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
ยงtype Value = <<T as ReadUntracked>::Value as Deref>::Target
type Value = <<T as ReadUntracked>::Value as Deref>::Target
ยง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.