pub struct ArcMemo<T, S = SyncStorage>where
S: Storage<T>,{ /* private fields */ }
Expand description
An efficient derived reactive value based on other reactive values.
This is a reference-counted memo, which is Clone
but not Copy
.
For arena-allocated Copy
memos, use Memo
.
Unlike a “derived signal,” a memo comes with two guarantees:
- The memo will only run once per change, no matter how many times you access its value.
- The memo will only notify its dependents if the value of the computation changes.
This makes a memo the perfect tool for expensive computations.
Memos have a certain overhead compared to derived signals. In most cases, you should create a derived signal. But if the derivation calculation is expensive, you should create a memo.
As with an Effect
, the argument to the memo function is the previous value,
i.e., the current value of the memo, which will be None
for the initial calculation.
§Examples
let (value, set_value) = signal(0);
// 🆗 we could create a derived signal with a simple function
let double_value = move || value.get() * 2;
set_value.set(2);
assert_eq!(double_value(), 4);
// but imagine the computation is really expensive
let expensive = move || really_expensive_computation(value.get()); // lazy: doesn't run until called
// 🆗 run #1: calls `really_expensive_computation` the first time
println!("expensive = {}", expensive());
// ❌ run #2: this calls `really_expensive_computation` a second time!
let some_value = expensive();
// instead, we create a memo
// 🆗 run #1: the calculation runs once immediately
let memoized = ArcMemo::new(move |_| really_expensive_computation(value.get()));
// 🆗 reads the current value of the memo
// can be `memoized()` on nightly
println!("memoized = {}", memoized.get());
// ✅ reads the current value **without re-running the calculation**
let some_value = memoized.get();
§Core Trait Implementations
.get()
clones the current value of the memo. If you call it within an effect, it will cause that effect to subscribe to the memo, and to re-run whenever the value of the memo changes..get_untracked()
clones the value of the memo without reactively tracking it.
.read()
returns a guard that allows accessing the value of the memo by reference. If you call it within an effect, it will cause that effect to subscribe to the memo, and to re-run whenever the value of the memo changes..read_untracked()
gives access to the current value of the memo without reactively tracking it.
.with()
allows you to reactively access the memo’s value without cloning by applying a callback function..with_untracked()
allows you to access the memo’s value by applying a callback function without reactively tracking it.
.to_stream()
converts the memo to anasync
stream of values.::from_stream()
converts anasync
stream of values into a memo containing the latest value.
Implementations§
Source§impl<T> ArcMemo<T>where
T: 'static,
SyncStorage: Storage<T>,
impl<T> ArcMemo<T>where
T: 'static,
SyncStorage: Storage<T>,
Sourcepub fn new(fun: impl Fn(Option<&T>) -> T + Send + Sync + 'static) -> ArcMemo<T>where
T: PartialEq,
pub fn new(fun: impl Fn(Option<&T>) -> T + Send + Sync + 'static) -> ArcMemo<T>where
T: PartialEq,
Creates a new memo by passing a function that computes the value.
This is lazy: the function will not be called until the memo’s value is read for the first time.
Sourcepub fn new_with_compare(
fun: impl Fn(Option<&T>) -> T + Send + Sync + 'static,
changed: fn(_: Option<&T>, _: Option<&T>) -> bool,
) -> ArcMemo<T>
pub fn new_with_compare( fun: impl Fn(Option<&T>) -> T + Send + Sync + 'static, changed: fn(_: Option<&T>, _: Option<&T>) -> bool, ) -> ArcMemo<T>
Creates a new memo by passing a function that computes the value, and a comparison function
that takes the previous value and the new value and returns true
if the value has
changed.
This is lazy: the function will not be called until the memo’s value is read for the first time.
Sourcepub fn new_owning(
fun: impl Fn(Option<T>) -> (T, bool) + Send + Sync + 'static,
) -> ArcMemo<T>
pub fn new_owning( fun: impl Fn(Option<T>) -> (T, bool) + Send + Sync + 'static, ) -> ArcMemo<T>
Creates a new memo by passing a function that computes the value.
Unlike ArcMemo::new
, this receives ownership of the previous value. As a result, it
must return both the new value and a bool
that is true
if the value has changed.
This is lazy: the function will not be called until the memo’s value is read for the first time.
Trait Implementations§
Source§impl<V> AddAnyAttr for ArcMemo<V>
impl<V> AddAnyAttr for ArcMemo<V>
Source§impl<V> AttributeValue for ArcMemo<V>where
ArcMemo<V>: Get<Value = V>,
V: AttributeValue + Clone + Send + Sync + 'static,
<V as AttributeValue>::State: 'static,
impl<V> AttributeValue for ArcMemo<V>where
ArcMemo<V>: Get<Value = V>,
V: AttributeValue + Clone + Send + Sync + 'static,
<V as AttributeValue>::State: 'static,
Source§type AsyncOutput = ArcMemo<V>
type AsyncOutput = ArcMemo<V>
Source§type State = RenderEffect<<V as AttributeValue>::State>
type State = RenderEffect<<V as AttributeValue>::State>
Source§type Cloneable = ArcMemo<V>
type Cloneable = ArcMemo<V>
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 = ArcMemo<V>
type CloneableOwned = ArcMemo<V>
'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,
) -> <ArcMemo<V> as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <ArcMemo<V> as AttributeValue>::State
<template>
.Source§fn build(self, el: &Element, key: &str) -> <ArcMemo<V> as AttributeValue>::State
fn build(self, el: &Element, key: &str) -> <ArcMemo<V> as AttributeValue>::State
Source§fn rebuild(self, key: &str, state: &mut <ArcMemo<V> as AttributeValue>::State)
fn rebuild(self, key: &str, state: &mut <ArcMemo<V> as AttributeValue>::State)
Source§fn into_cloneable(self) -> <ArcMemo<V> as AttributeValue>::Cloneable
fn into_cloneable(self) -> <ArcMemo<V> as AttributeValue>::Cloneable
Source§fn into_cloneable_owned(self) -> <ArcMemo<V> as AttributeValue>::CloneableOwned
fn into_cloneable_owned(self) -> <ArcMemo<V> as AttributeValue>::CloneableOwned
'static
.Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <ArcMemo<V> as AttributeValue>::AsyncOutput
async fn resolve(self) -> <ArcMemo<V> as AttributeValue>::AsyncOutput
Source§impl<T, S> DefinedAt for ArcMemo<T, S>where
S: Storage<T>,
impl<T, S> DefinedAt for ArcMemo<T, S>where
S: Storage<T>,
Source§fn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
None
in
release mode.Source§impl<T> From<ArcMemo<T>> for MaybeSignal<T>
impl<T> From<ArcMemo<T>> for MaybeSignal<T>
Source§fn from(value: ArcMemo<T>) -> MaybeSignal<T>
fn from(value: ArcMemo<T>) -> MaybeSignal<T>
Source§impl<T> From<ArcMemo<T, LocalStorage>> for Signal<T, LocalStorage>
impl<T> From<ArcMemo<T, LocalStorage>> for Signal<T, LocalStorage>
Source§fn from(value: ArcMemo<T, LocalStorage>) -> Signal<T, LocalStorage>
fn from(value: ArcMemo<T, LocalStorage>) -> Signal<T, LocalStorage>
Source§impl<T> From<ArcReadSignal<T>> for ArcMemo<T>
impl<T> From<ArcReadSignal<T>> for ArcMemo<T>
Source§fn from(value: ArcReadSignal<T>) -> ArcMemo<T>
fn from(value: ArcReadSignal<T>) -> ArcMemo<T>
Source§impl<T> From<ArcRwSignal<T>> for ArcMemo<T>
impl<T> From<ArcRwSignal<T>> for ArcMemo<T>
Source§fn from(value: ArcRwSignal<T>) -> ArcMemo<T>
fn from(value: ArcRwSignal<T>) -> ArcMemo<T>
Source§impl<T> FromLocal<ArcMemo<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
impl<T> FromLocal<ArcMemo<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
Source§fn from_local(value: ArcMemo<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
fn from_local(value: ArcMemo<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
Source§impl<T> FromLocal<ArcMemo<T, LocalStorage>> for Memo<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcMemo<T, LocalStorage>> for Memo<T, LocalStorage>where
T: 'static,
Source§fn from_local(value: ArcMemo<T, LocalStorage>) -> Memo<T, LocalStorage>
fn from_local(value: ArcMemo<T, LocalStorage>) -> Memo<T, LocalStorage>
Source§impl<V> InnerHtmlValue for ArcMemo<V>where
ArcMemo<V>: Get<Value = V>,
V: InnerHtmlValue + Send + Sync + Clone + 'static,
<V as InnerHtmlValue>::State: 'static,
impl<V> InnerHtmlValue for ArcMemo<V>where
ArcMemo<V>: Get<Value = V>,
V: InnerHtmlValue + Send + Sync + Clone + 'static,
<V as InnerHtmlValue>::State: 'static,
Source§type AsyncOutput = ArcMemo<V>
type AsyncOutput = ArcMemo<V>
Source§type State = RenderEffect<<V as InnerHtmlValue>::State>
type State = RenderEffect<<V as InnerHtmlValue>::State>
Source§type CloneableOwned = ArcMemo<V>
type CloneableOwned = ArcMemo<V>
'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,
) -> <ArcMemo<V> as InnerHtmlValue>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <ArcMemo<V> as InnerHtmlValue>::State
<template>
.Source§fn build(self, el: &Element) -> <ArcMemo<V> as InnerHtmlValue>::State
fn build(self, el: &Element) -> <ArcMemo<V> as InnerHtmlValue>::State
Source§fn into_cloneable(self) -> <ArcMemo<V> as InnerHtmlValue>::Cloneable
fn into_cloneable(self) -> <ArcMemo<V> as InnerHtmlValue>::Cloneable
Source§fn into_cloneable_owned(self) -> <ArcMemo<V> as InnerHtmlValue>::CloneableOwned
fn into_cloneable_owned(self) -> <ArcMemo<V> as InnerHtmlValue>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <ArcMemo<V> as InnerHtmlValue>::AsyncOutput
async fn resolve(self) -> <ArcMemo<V> as InnerHtmlValue>::AsyncOutput
Source§impl<C> IntoClass for ArcMemo<C>
impl<C> IntoClass for ArcMemo<C>
Source§type AsyncOutput = ArcMemo<C>
type AsyncOutput = ArcMemo<C>
Source§type State = RenderEffect<<C as IntoClass>::State>
type State = RenderEffect<<C as IntoClass>::State>
Source§type CloneableOwned = ArcMemo<C>
type CloneableOwned = ArcMemo<C>
'static
.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <ArcMemo<C> as IntoClass>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <ArcMemo<C> as IntoClass>::State
<template>
.Source§fn build(self, el: &Element) -> <ArcMemo<C> as IntoClass>::State
fn build(self, el: &Element) -> <ArcMemo<C> as IntoClass>::State
Source§fn into_cloneable(self) -> <ArcMemo<C> as IntoClass>::Cloneable
fn into_cloneable(self) -> <ArcMemo<C> as IntoClass>::Cloneable
Source§fn into_cloneable_owned(self) -> <ArcMemo<C> as IntoClass>::CloneableOwned
fn into_cloneable_owned(self) -> <ArcMemo<C> as IntoClass>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <ArcMemo<C> as IntoClass>::AsyncOutput
async fn resolve(self) -> <ArcMemo<C> as IntoClass>::AsyncOutput
Source§fn reset(state: &mut <ArcMemo<C> as IntoClass>::State)
fn reset(state: &mut <ArcMemo<C> 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> IntoProperty for ArcMemo<V>where
ArcMemo<V>: Get<Value = V>,
V: IntoProperty + Send + Sync + Clone + 'static,
<V as IntoProperty>::State: 'static,
impl<V> IntoProperty for ArcMemo<V>where
ArcMemo<V>: Get<Value = V>,
V: IntoProperty + Send + Sync + Clone + 'static,
<V as IntoProperty>::State: 'static,
Source§type State = RenderEffect<<V as IntoProperty>::State>
type State = RenderEffect<<V as IntoProperty>::State>
Source§type CloneableOwned = ArcMemo<V>
type CloneableOwned = ArcMemo<V>
'static
.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
key: &str,
) -> <ArcMemo<V> as IntoProperty>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <ArcMemo<V> as IntoProperty>::State
Source§fn build(self, el: &Element, key: &str) -> <ArcMemo<V> as IntoProperty>::State
fn build(self, el: &Element, key: &str) -> <ArcMemo<V> as IntoProperty>::State
Source§fn rebuild(self, state: &mut <ArcMemo<V> as IntoProperty>::State, key: &str)
fn rebuild(self, state: &mut <ArcMemo<V> as IntoProperty>::State, key: &str)
Source§fn into_cloneable(self) -> <ArcMemo<V> as IntoProperty>::Cloneable
fn into_cloneable(self) -> <ArcMemo<V> as IntoProperty>::Cloneable
Source§fn into_cloneable_owned(self) -> <ArcMemo<V> as IntoProperty>::CloneableOwned
fn into_cloneable_owned(self) -> <ArcMemo<V> as IntoProperty>::CloneableOwned
Source§impl<C> IntoStyle for ArcMemo<C>
impl<C> IntoStyle for ArcMemo<C>
Source§type AsyncOutput = ArcMemo<C>
type AsyncOutput = ArcMemo<C>
Source§type State = RenderEffect<<C as IntoStyle>::State>
type State = RenderEffect<<C as IntoStyle>::State>
Source§type CloneableOwned = ArcMemo<C>
type CloneableOwned = ArcMemo<C>
'static
.Source§fn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <ArcMemo<C> as IntoStyle>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <ArcMemo<C> as IntoStyle>::State
<template>
.Source§fn build(self, el: &Element) -> <ArcMemo<C> as IntoStyle>::State
fn build(self, el: &Element) -> <ArcMemo<C> as IntoStyle>::State
Source§fn into_cloneable(self) -> <ArcMemo<C> as IntoStyle>::Cloneable
fn into_cloneable(self) -> <ArcMemo<C> as IntoStyle>::Cloneable
Source§fn into_cloneable_owned(self) -> <ArcMemo<C> as IntoStyle>::CloneableOwned
fn into_cloneable_owned(self) -> <ArcMemo<C> as IntoStyle>::CloneableOwned
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§impl<T, S> IsDisposed for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> IsDisposed for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
Source§fn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
true
, the signal cannot be accessed without a panic.Source§impl<T, S> ReactiveNode for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> ReactiveNode for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
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, S> ReadUntracked for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> ReadUntracked for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
Source§type Value = ReadGuard<T, Mapped<Plain<MemoInner<T, S>>, T>>
type Value = ReadGuard<T, Mapped<Plain<MemoInner<T, S>>, T>>
Source§fn try_read_untracked(&self) -> Option<<ArcMemo<T, S> as ReadUntracked>::Value>
fn try_read_untracked(&self) -> Option<<ArcMemo<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> Render for ArcMemo<V>
impl<V> Render for ArcMemo<V>
Source§impl<V> RenderHtml for ArcMemo<V>
impl<V> RenderHtml for ArcMemo<V>
Source§const MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
Source§type AsyncOutput = ArcMemo<V>
type AsyncOutput = ArcMemo<V>
Source§fn dry_resolve(&mut self)
fn dry_resolve(&mut self)
Source§async fn resolve(self) -> <ArcMemo<V> as RenderHtml>::AsyncOutput
async fn resolve(self) -> <ArcMemo<V> 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,
)
fn to_html_with_buf( self, buf: &mut String, position: &mut Position, escape: bool, mark_branches: bool, )
Source§fn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
)
fn to_html_async_with_buf<const OUT_OF_ORDER: bool>( self, buf: &mut StreamBuilder, position: &mut Position, escape: bool, mark_branches: bool, )
Source§fn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <ArcMemo<V> as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <ArcMemo<V> as Render>::State
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_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 ArcMemo<T, St>
impl<T, St> Serialize for ArcMemo<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> Source for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> Source for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
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§fn clear_subscribers(&self)
fn clear_subscribers(&self)
Source§impl<T, S> Subscriber for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> Subscriber for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
Source§fn add_source(&self, source: AnySource)
fn add_source(&self, source: AnySource)
Source§fn clear_sources(&self, subscriber: &AnySubscriber)
fn clear_sources(&self, subscriber: &AnySubscriber)
Source§impl<T, S> ToAnySource for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> ToAnySource for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
Source§fn to_any_source(&self) -> AnySource
fn to_any_source(&self) -> AnySource
Source§impl<T, S> ToAnySubscriber for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
impl<T, S> ToAnySubscriber for ArcMemo<T, S>where
T: 'static,
S: Storage<T>,
Source§fn to_any_subscriber(&self) -> AnySubscriber
fn to_any_subscriber(&self) -> AnySubscriber
impl<T, S> Eq for ArcMemo<T, S>where
S: Storage<T>,
Auto Trait Implementations§
impl<T, S> Freeze for ArcMemo<T, S>
impl<T, S> RefUnwindSafe for ArcMemo<T, S>
impl<T, S> Send for ArcMemo<T, S>
impl<T, S> Sync for ArcMemo<T, S>
impl<T, S> Unpin for ArcMemo<T, S>
impl<T, S> UnwindSafe for ArcMemo<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<S, T> FromStream<T> for S
impl<S, T> FromStream<T> for S
Source§fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S
fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S
Source§fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S
fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S
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> 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<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
impl<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
Source§async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>
Source§impl<T> Read for Twhere
T: Track + ReadUntracked,
impl<T> Read for Twhere
T: Track + ReadUntracked,
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> 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.