Struct ReadSignal
pub struct ReadSignal<T, S = SyncStorage> {
pub(crate) inner: ArenaItem<ArcReadSignal<T>, S>,
}
Expand description
An arena-allocated getter for a reactive signal.
A signal is a piece of data that may change over time, and notifies other code when it has changed.
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 ArcReadSignal
.
ยงCore Trait Implementations
.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 anasync
stream of values.::from_stream()
converts anasync
stream of values into a signal containing the latest value.
ยงExamples
let (count, set_count) = signal(0);
// calling .get() clones and returns the value
assert_eq!(count.get(), 0);
// calling .read() accesses the value by reference
assert_eq!(count.read(), 0);
Fieldsยง
ยงinner: ArenaItem<ArcReadSignal<T>, S>
Trait Implementationsยง
ยงimpl<T, S> Clone for ReadSignal<T, S>
impl<T, S> Clone for ReadSignal<T, S>
ยงfn clone(&self) -> ReadSignal<T, S>
fn clone(&self) -> ReadSignal<T, S>
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreยงimpl<T, S> Debug for ReadSignal<T, S>where
S: Debug,
impl<T, S> Debug for ReadSignal<T, S>where
S: Debug,
ยงimpl<T, S> DefinedAt for ReadSignal<T, S>
impl<T, S> DefinedAt for ReadSignal<T, S>
ยงfn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
Returns the location at which the signal was defined. This is usually simply
None
in
release mode.ยงimpl<T, S> Fn() for ReadSignal<T, S>where
ReadSignal<T, S>: Get,
S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,
impl<T, S> Fn() for ReadSignal<T, S>where
ReadSignal<T, S>: Get,
S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,
ยงimpl<T, S> FnMut() for ReadSignal<T, S>where
ReadSignal<T, S>: Get,
S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,
impl<T, S> FnMut() for ReadSignal<T, S>where
ReadSignal<T, S>: Get,
S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,
ยงimpl<T, S> FnOnce() for ReadSignal<T, S>where
ReadSignal<T, S>: Get,
S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,
impl<T, S> FnOnce() for ReadSignal<T, S>where
ReadSignal<T, S>: Get,
S: Storage<T> + Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>,
ยงimpl<T> From<ArcReadSignal<T>> for ReadSignal<T>
impl<T> From<ArcReadSignal<T>> for ReadSignal<T>
ยงfn from(value: ArcReadSignal<T>) -> ReadSignal<T>
fn from(value: ArcReadSignal<T>) -> ReadSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<Option<T>>> for MaybeProp<T>
impl<T> From<ReadSignal<Option<T>>> for MaybeProp<T>
ยงfn from(value: ReadSignal<Option<T>>) -> MaybeProp<T>
fn from(value: ReadSignal<Option<T>>) -> MaybeProp<T>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<ReadSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(
value: ReadSignal<Option<T>, LocalStorage>,
) -> MaybeProp<T, LocalStorage>
fn from( value: ReadSignal<Option<T>, LocalStorage>, ) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<T>> for MaybeProp<T>
impl<T> From<ReadSignal<T>> for MaybeProp<T>
ยงfn from(value: ReadSignal<T>) -> MaybeProp<T>
fn from(value: ReadSignal<T>) -> MaybeProp<T>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<T>> for MaybeSignal<T>
impl<T> From<ReadSignal<T>> for MaybeSignal<T>
ยงfn from(value: ReadSignal<T>) -> MaybeSignal<T>
fn from(value: ReadSignal<T>) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<T>> for OptionalProp<Signal<T>>
impl<T> From<ReadSignal<T>> for OptionalProp<Signal<T>>
ยงfn from(value: ReadSignal<T>) -> OptionalProp<Signal<T>>
fn from(value: ReadSignal<T>) -> OptionalProp<Signal<T>>
Converts to this type from the input type.
ยง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>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<ReadSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(value: ReadSignal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: ReadSignal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
ยงimpl<T> From<ReadSignal<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
impl<T> From<ReadSignal<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
ยงfn from(value: ReadSignal<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
fn from(value: ReadSignal<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
Converts to this type from the input type.
ยง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>
Converts to this type from the input type.
ยงimpl<T, S> From<ReadSignal<T, S>> for ArcReadSignal<T>where
T: 'static,
S: Storage<ArcReadSignal<T>>,
impl<T, S> From<ReadSignal<T, S>> for ArcReadSignal<T>where
T: 'static,
S: Storage<ArcReadSignal<T>>,
ยงfn from(value: ReadSignal<T, S>) -> ArcReadSignal<T>
fn from(value: ReadSignal<T, S>) -> ArcReadSignal<T>
Converts to this type from the input type.
ยงimpl<T> FromLocal<ArcReadSignal<T>> for ReadSignal<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcReadSignal<T>> for ReadSignal<T, LocalStorage>where
T: 'static,
ยงfn from_local(value: ArcReadSignal<T>) -> ReadSignal<T, LocalStorage>
fn from_local(value: ArcReadSignal<T>) -> ReadSignal<T, LocalStorage>
Converts between the types.
ยงimpl<T, S> Hash for ReadSignal<T, S>
impl<T, S> Hash for ReadSignal<T, S>
ยงimpl<T, S> IntoInner for ReadSignal<T, S>where
S: Storage<ArcReadSignal<T>>,
impl<T, S> IntoInner for ReadSignal<T, S>where
S: Storage<ArcReadSignal<T>>,
ยงfn into_inner(self) -> Option<<ReadSignal<T, S> as IntoInner>::Value>
fn into_inner(self) -> Option<<ReadSignal<T, S> as IntoInner>::Value>
Returns the inner value if this is the only reference to the signal.
Otherwise, returns
None
and drops this reference. Read moreยงimpl<T, S> IsDisposed for ReadSignal<T, S>
impl<T, S> IsDisposed for ReadSignal<T, S>
ยงfn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
If
true
, the signal cannot be accessed without a panic.ยงimpl<T, S> PartialEq for ReadSignal<T, S>
impl<T, S> PartialEq for ReadSignal<T, S>
ยงimpl<T, S> ReadUntracked for ReadSignal<T, S>where
T: 'static,
S: Storage<ArcReadSignal<T>>,
impl<T, S> ReadUntracked for ReadSignal<T, S>where
T: 'static,
S: Storage<ArcReadSignal<T>>,
ยงtype Value = ReadGuard<T, Plain<T>>
type Value = ReadGuard<T, Plain<T>>
The guard type that will be returned, which can be dereferenced to the value.
ยงfn try_read_untracked(
&self,
) -> Option<<ReadSignal<T, S> as ReadUntracked>::Value>
fn try_read_untracked( &self, ) -> Option<<ReadSignal<T, S> as ReadUntracked>::Value>
Returns the guard, or
None
if the signal has already been disposed.ยงfn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
Returns the guard. Read more
ยงfn custom_try_read(&self) -> Option<Option<Self::Value>>
fn custom_try_read(&self) -> Option<Option<Self::Value>>
This is a backdoor to allow overriding the
Read::try_read
implementation despite it being auto implemented. Read moreยงimpl<T, St> Serialize for ReadSignal<T, St>
impl<T, St> Serialize for ReadSignal<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,
Serialize this value into the given Serde serializer. Read more
impl<T, S> Copy for ReadSignal<T, S>
impl<T, S> Eq for ReadSignal<T, S>
Auto Trait Implementationsยง
impl<T, S> Freeze for ReadSignal<T, S>
impl<T, S> RefUnwindSafe for ReadSignal<T, S>
impl<T, S> Send for ReadSignal<T, S>
impl<T, S> Sync for ReadSignal<T, S>
impl<T, S> Unpin for ReadSignal<T, S>
impl<T, S> UnwindSafe for ReadSignal<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>,
Convert the source color to the destination color using the specified
method.
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default.
ยงimpl<F, V> AddAnyAttr for Fwhere
F: ReactiveFunction<Output = V>,
V: RenderHtml + 'static,
impl<F, V> AddAnyAttr for Fwhere
F: ReactiveFunction<Output = V>,
V: RenderHtml + 'static,
ยงtype Output<SomeNewAttr: Attribute> = Box<dyn FnMut() -> <V as AddAnyAttr>::Output<<SomeNewAttr as Attribute>::CloneableOwned> + Send>
type Output<SomeNewAttr: Attribute> = Box<dyn FnMut() -> <V as AddAnyAttr>::Output<<SomeNewAttr as Attribute>::CloneableOwned> + Send>
The new type once the attribute has been added.
ยงfn add_any_attr<NewAttr>(
self,
attr: NewAttr,
) -> <F as AddAnyAttr>::Output<NewAttr>
fn add_any_attr<NewAttr>( self, attr: NewAttr, ) -> <F as AddAnyAttr>::Output<NewAttr>
Adds an attribute to the view.
ยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
ยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
ยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Cast a collection of colors into a collection of arrays.
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
Cast this collection of arrays into a collection of colors.
ยงimpl<F, V> AttributeValue for Fwhere
F: ReactiveFunction<Output = V>,
V: AttributeValue + 'static,
<V as AttributeValue>::State: 'static,
impl<F, V> AttributeValue for Fwhere
F: ReactiveFunction<Output = V>,
V: AttributeValue + 'static,
<V as AttributeValue>::State: 'static,
ยงtype AsyncOutput = <V as AttributeValue>::AsyncOutput
type AsyncOutput = <V as AttributeValue>::AsyncOutput
The type once all async data have loaded.
ยงtype State = RenderEffect<<V as AttributeValue>::State>
type State = RenderEffect<<V as AttributeValue>::State>
The state that should be retained between building and rebuilding.
ยงtype Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>
type Cloneable = Arc<Mutex<dyn FnMut() -> V + Send>>
A version of the value that can be cloned. This can be the same type, or a
reference-counted type. Generally speaking, this does not need to refer to the same data,
but should behave in the same way. So for example, making an event handler cloneable should
probably make it reference-counted (so that a
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 = Arc<Mutex<dyn FnMut() -> V + Send>>
type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>
A cloneable type that is also
'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)
Renders the attribute value to HTML for a
<template>
.ยงfn hydrate<const FROM_SERVER: bool>(
self,
key: &str,
el: &Element,
) -> <F as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <F as AttributeValue>::State
Adds interactivity as necessary, given DOM nodes that were created from HTML that has
either been rendered on the server, or cloned for a
<template>
.ยงfn build(self, el: &Element, key: &str) -> <F as AttributeValue>::State
fn build(self, el: &Element, key: &str) -> <F as AttributeValue>::State
Adds this attribute to the element during client-side rendering.
ยงfn rebuild(self, key: &str, state: &mut <F as AttributeValue>::State)
fn rebuild(self, key: &str, state: &mut <F as AttributeValue>::State)
Applies a new value for the attribute.
ยงfn into_cloneable(self) -> <F as AttributeValue>::Cloneable
fn into_cloneable(self) -> <F as AttributeValue>::Cloneable
Converts this attribute into an equivalent that can be cloned.
ยงfn into_cloneable_owned(self) -> <F as AttributeValue>::CloneableOwned
fn into_cloneable_owned(self) -> <F as AttributeValue>::CloneableOwned
Converts this attributes into an equivalent that can be cloned and is
'static
.ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
โRunsโ the attribute without other side effects. For primitive types, this is a no-op. For
reactive types, this can be used to gather data about reactivity or about asynchronous data
that needs to be loaded.
ยง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>>
The type of the element with the two-way binding added.
ยง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
Adds a two-way binding to the element, which adds an attribute and an event listener to the
element when the element is created or hydrated. Read more
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
ยงimpl<T> CallHasher for T
impl<T> CallHasher for 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
The number type thatโs used in
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
Converts
self
into C
, using the provided parameters.ยงimpl<F, View> ChooseView for F
impl<F, View> ChooseView for F
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงimpl<Func, T> ComponentConstructor<(), T> for Funcwhere
Func: FnOnce() -> T,
impl<Func, T> ComponentConstructor<(), T> for Funcwhere
Func: FnOnce() -> T,
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
Cast a collection of colors into a collection of color components.
ยง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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
ยงfn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
ยง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>>
The type of the element with the directive added.
ยง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
Adds a directive to the element, which runs some custom logic in the browser when the element
is created or hydrated.
ยง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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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<Func> EffectFunction<(), NoParam> for Funcwhere
Func: FnMut(),
impl<Func> EffectFunction<(), NoParam> for Funcwhere
Func: FnMut(),
ยง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
Checks if this value is equivalent to the given key. Read more
ยง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
Compare self to
key
and return true
if they are equal.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
Performs a conversion from
angle
.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
Converts
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
Creates a signal that contains the latest value of the stream.
ยงfn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S
fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> S
Creates a signal that contains the latest value of the stream.
ยงimpl<F, Fut, Res, S> Handler<((),), S> for F
impl<F, Fut, Res, S> Handler<((),), S> for F
ยงtype Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>
type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>
The type of future calling this handler returns.
ยงfn call(
self,
_req: Request<Body>,
_state: S,
) -> <F as Handler<((),), S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <F as Handler<((),), S>>::Future
Call the handler with the given request.
ยงfn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a [
tower::Layer
] to the handler. Read moreยงfn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a [
Service
] by providing the stateยงimpl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
ยงfn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Convert the handler into a [
Service
] and no state.ยงfn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
Convert the handler into a
MakeService
and no state. Read moreยงfn into_make_service_with_connect_info<C>(
self,
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
Convert the handler into a
MakeService
which stores information
about the incoming connection and has no state. Read moreยงimpl<F, V> InnerHtmlValue for Fwhere
F: ReactiveFunction<Output = V>,
V: InnerHtmlValue + 'static,
<V as InnerHtmlValue>::State: 'static,
impl<F, V> InnerHtmlValue for Fwhere
F: ReactiveFunction<Output = V>,
V: InnerHtmlValue + 'static,
<V as InnerHtmlValue>::State: 'static,
ยงtype AsyncOutput = <V as InnerHtmlValue>::AsyncOutput
type AsyncOutput = <V as InnerHtmlValue>::AsyncOutput
The type after all async data have resolved.
ยงtype State = RenderEffect<<V as InnerHtmlValue>::State>
type State = RenderEffect<<V as InnerHtmlValue>::State>
The view state retained between building and rebuilding.
ยงtype CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>
type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>
An equivalent value that can be cloned and is
'static
.ยงfn to_template(_buf: &mut String)
fn to_template(_buf: &mut String)
Renders the class to HTML for a
<template>
.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <F as InnerHtmlValue>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as InnerHtmlValue>::State
Adds interactivity as necessary, given DOM nodes that were created from HTML that has
either been rendered on the server, or cloned for a
<template>
.ยงfn build(self, el: &Element) -> <F as InnerHtmlValue>::State
fn build(self, el: &Element) -> <F as InnerHtmlValue>::State
Adds this class to the element during client-side rendering.
ยงfn into_cloneable(self) -> <F as InnerHtmlValue>::Cloneable
fn into_cloneable(self) -> <F as InnerHtmlValue>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(self) -> <F as InnerHtmlValue>::CloneableOwned
fn into_cloneable_owned(self) -> <F as InnerHtmlValue>::CloneableOwned
Converts this to a cloneable, owned type.
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
โRunsโ the attribute without other side effects. For primitive types, this is a no-op. For
reactive types, this can be used to gather data about reactivity or about asynchronous data
that needs to be loaded.
ยง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
Performs a conversion into
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
Consumes this value, transforming it into an attribute value.
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
The number type thatโs used in
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
Converts
self
into C
, using the provided parameters.ยงimpl<T> IntoChooseViewMaybeErased for T
impl<T> IntoChooseViewMaybeErased for T
ยงfn into_maybe_erased(self) -> <T as IntoChooseViewMaybeErased>::Output
fn into_maybe_erased(self) -> <T as IntoChooseViewMaybeErased>::Output
Erase the type of the view.
ยงimpl<F, C> IntoClass for Fwhere
F: ReactiveFunction<Output = C>,
C: IntoClass + 'static,
<C as IntoClass>::State: 'static,
impl<F, C> IntoClass for Fwhere
F: ReactiveFunction<Output = C>,
C: IntoClass + 'static,
<C as IntoClass>::State: 'static,
ยงtype AsyncOutput = <C as IntoClass>::AsyncOutput
type AsyncOutput = <C as IntoClass>::AsyncOutput
The type after all async data have resolved.
ยงtype State = RenderEffect<<C as IntoClass>::State>
type State = RenderEffect<<C as IntoClass>::State>
The view state retained between building and rebuilding.
ยงtype CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>
type CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>
An equivalent value that can be cloned and is
'static
.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <F as IntoClass>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as IntoClass>::State
Adds interactivity as necessary, given DOM nodes that were created from HTML that has
either been rendered on the server, or cloned for a
<template>
.ยงfn build(self, el: &Element) -> <F as IntoClass>::State
fn build(self, el: &Element) -> <F as IntoClass>::State
Adds this class to the element during client-side rendering.
ยงfn into_cloneable(self) -> <F as IntoClass>::Cloneable
fn into_cloneable(self) -> <F as IntoClass>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(self) -> <F as IntoClass>::CloneableOwned
fn into_cloneable_owned(self) -> <F as IntoClass>::CloneableOwned
Converts this to a cloneable, owned type.
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
โRunsโ the attribute without other side effects. For primitive types, this is a no-op. For
reactive types, this can be used to gather data about reactivity or about asynchronous data
that needs to be loaded.
ยงasync fn resolve(self) -> <F as IntoClass>::AsyncOutput
async fn resolve(self) -> <F as IntoClass>::AsyncOutput
โResolvesโ this into a type that is not waiting for any asynchronous data.
ยงfn reset(state: &mut <F as IntoClass>::State)
fn reset(state: &mut <F as IntoClass>::State)
Reset the class list to the state before this class was added.
ยงconst MIN_LENGTH: usize = _
const MIN_LENGTH: usize = _
The minimum length of the HTML.
ยงfn to_template(class: &mut String)
fn to_template(class: &mut String)
Renders the class to HTML for a
<template>
.ยงimpl<T, U> IntoClass for Twhere
T: Fn() -> U + 'static,
U: IntoClassValue,
impl<T, U> IntoClass for Twhere
T: Fn() -> U + 'static,
U: IntoClassValue,
fn into_class(self) -> Class
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
Convert into T with values clamped to the color defined bounds Read more
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
Convert into T. The resulting color might be invalid in its color space Read more
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read 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
Converts the view into a type-erased view if in erased mode.
ยงimpl<F, V> IntoProperty for Fwhere
F: ReactiveFunction<Output = V>,
V: IntoProperty + 'static,
<V as IntoProperty>::State: 'static,
impl<F, V> IntoProperty for Fwhere
F: ReactiveFunction<Output = V>,
V: IntoProperty + 'static,
<V as IntoProperty>::State: 'static,
ยงtype State = RenderEffect<<V as IntoProperty>::State>
type State = RenderEffect<<V as IntoProperty>::State>
The view state retained between building and rebuilding.
ยงtype CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>
type CloneableOwned = Arc<Mutex<dyn FnMut() -> V + Send>>
An equivalent value that can be cloned and is
'static
.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
key: &str,
) -> <F as IntoProperty>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <F as IntoProperty>::State
Adds the property on an element created from HTML.
ยงfn build(self, el: &Element, key: &str) -> <F as IntoProperty>::State
fn build(self, el: &Element, key: &str) -> <F as IntoProperty>::State
Adds the property during client-side rendering.
ยงfn rebuild(self, state: &mut <F as IntoProperty>::State, key: &str)
fn rebuild(self, state: &mut <F as IntoProperty>::State, key: &str)
Updates the property with a new value.
ยงfn into_cloneable(self) -> <F as IntoProperty>::Cloneable
fn into_cloneable(self) -> <F as IntoProperty>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(self) -> <F as IntoProperty>::CloneableOwned
fn into_cloneable_owned(self) -> <F as IntoProperty>::CloneableOwned
Converts this to a cloneable, owned type.
ยง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
Consumes this value, transforming it into the renderable type.
Sourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
Converts
self
into T
, while performing the appropriate scaling,
rounding and clamping.ยงimpl<F, C> IntoStyle for Fwhere
F: ReactiveFunction<Output = C>,
C: IntoStyle + 'static,
<C as IntoStyle>::State: 'static,
impl<F, C> IntoStyle for Fwhere
F: ReactiveFunction<Output = C>,
C: IntoStyle + 'static,
<C as IntoStyle>::State: 'static,
ยงtype AsyncOutput = <C as IntoStyle>::AsyncOutput
type AsyncOutput = <C as IntoStyle>::AsyncOutput
The type after all async data have resolved.
ยงtype State = RenderEffect<<C as IntoStyle>::State>
type State = RenderEffect<<C as IntoStyle>::State>
The view state retained between building and rebuilding.
ยงtype CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>
type CloneableOwned = Arc<Mutex<dyn FnMut() -> C + Send>>
An equivalent value that can be cloned and is
'static
.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <F as IntoStyle>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <F as IntoStyle>::State
Adds interactivity as necessary, given DOM nodes that were created from HTML that has
either been rendered on the server, or cloned for a
<template>
.ยงfn build(self, el: &Element) -> <F as IntoStyle>::State
fn build(self, el: &Element) -> <F as IntoStyle>::State
Adds this style to the element during client-side rendering.
ยงfn into_cloneable(self) -> <F as IntoStyle>::Cloneable
fn into_cloneable(self) -> <F as IntoStyle>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(self) -> <F as IntoStyle>::CloneableOwned
fn into_cloneable_owned(self) -> <F as IntoStyle>::CloneableOwned
Converts this to a cloneable, owned type.
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
โRunsโ the attribute without other side effects. For primitive types, this is a no-op. For
reactive types, this can be used to gather data about reactivity or about asynchronous data
that needs to be loaded.
ยงimpl<F, S> IntoStyleValue for Fwhere
F: ReactiveFunction<Output = S>,
S: IntoStyleValue + 'static,
impl<F, S> IntoStyleValue for Fwhere
F: ReactiveFunction<Output = S>,
S: IntoStyleValue + 'static,
ยงtype AsyncOutput = F
type AsyncOutput = F
The type after all async data have resolved.
ยงtype State = (Arc<str>, RenderEffect<<S as IntoStyleValue>::State>)
type State = (Arc<str>, RenderEffect<<S as IntoStyleValue>::State>)
The view state retained between building and rebuilding.
ยงtype CloneableOwned = Arc<Mutex<dyn FnMut() -> S + Send>>
type CloneableOwned = Arc<Mutex<dyn FnMut() -> S + Send>>
An equivalent value that can be cloned and is
'static
.ยงfn build(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <F as IntoStyleValue>::State
fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <F as IntoStyleValue>::State
Adds this style to the element during client-side rendering.
ยงfn rebuild(
self,
style: &CssStyleDeclaration,
name: &str,
state: &mut <F as IntoStyleValue>::State,
)
fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <F as IntoStyleValue>::State, )
Updates the value.
ยงfn hydrate(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <F as IntoStyleValue>::State
fn hydrate( self, style: &CssStyleDeclaration, name: &str, ) -> <F as IntoStyleValue>::State
Adds interactivity as necessary, given DOM nodes that were created from HTML that has
either been rendered on the server, or cloned for a
<template>
.ยงfn into_cloneable(self) -> <F as IntoStyleValue>::Cloneable
fn into_cloneable(self) -> <F as IntoStyleValue>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(self) -> <F as IntoStyleValue>::CloneableOwned
fn into_cloneable_owned(self) -> <F as IntoStyleValue>::CloneableOwned
Converts this to a cloneable, owned type.
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
โRunsโ the attribute without other side effects. For primitive types, this is a no-op. For
reactive types, this can be used to gather data about reactivity or about asynchronous data
that needs to be loaded.
ยงimpl<'a, F, W> MakeWriter<'a> for F
impl<'a, F, W> MakeWriter<'a> for F
ยงtype Writer = W
type Writer = W
The concrete
io::Write
implementation returned by make_writer
.ยงfn make_writer(&'a self) -> <F as MakeWriter<'a>>::Writer
fn make_writer(&'a self) -> <F as MakeWriter<'a>>::Writer
ยงfn make_writer_for(&'a self, meta: &Metadata<'_>) -> Self::Writer
fn make_writer_for(&'a self, meta: &Metadata<'_>) -> Self::Writer
ยงimpl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
ยงfn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
ยงfn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
ยงfn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
ยงfn or_else<W, B>(self, other: B) -> OrElse<Self, B>
fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
Combines
self
with another type implementing [MakeWriter
], returning
a new [MakeWriter
] that calls other
โs make_writer
if self
โs
make_writer
returns OptionalWriter::none
. Read moreยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> Pointee for T
impl<T> Pointee for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<F, T> ReactiveFunction for F
impl<F, T> ReactiveFunction for F
ยงimpl<T> ReactiveNode for Twhere
T: AsSubscriberSet + DefinedAt,
impl<T> ReactiveNode for Twhere
T: AsSubscriberSet + DefinedAt,
ยงfn mark_dirty(&self)
fn mark_dirty(&self)
Notifies the sourceโs dependencies that it has changed.
ยงfn mark_check(&self)
fn mark_check(&self)
Notifies the sourceโs dependencies that it may have changed.
ยงfn mark_subscribers_check(&self)
fn mark_subscribers_check(&self)
Marks that all subscribers need to be checked.
ยงfn update_if_necessary(&self) -> bool
fn update_if_necessary(&self) -> bool
Regenerates the value for this node, if needed, and returns whether
it has actually changed or not.
ยงimpl<T> Read for Twhere
T: Track + ReadUntracked,
impl<T> Read for Twhere
T: Track + ReadUntracked,
ยงimpl<F, V> Render for F
impl<F, V> Render for F
ยงimpl<F, V> RenderHtml for F
impl<F, V> RenderHtml for F
ยงconst MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
The minimum length of HTML created when this view is rendered.
ยงtype AsyncOutput = <V as RenderHtml>::AsyncOutput
type AsyncOutput = <V as RenderHtml>::AsyncOutput
The type of the view after waiting for all asynchronous data to load.
ยงfn dry_resolve(&mut self)
fn dry_resolve(&mut self)
โRunsโ the view without other side effects. For primitive types, this is a no-op. For
reactive types, this can be used to gather data about reactivity or about asynchronous data
that needs to be loaded.
ยงasync fn resolve(self) -> <F as RenderHtml>::AsyncOutput
async fn resolve(self) -> <F as RenderHtml>::AsyncOutput
Waits for any asynchronous sections of the view to load and returns the output.
ยง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>, )
Renders a view to HTML, writing it into the given buffer.
ยง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>, )
Renders a view into a buffer of (synchronous or asynchronous) HTML chunks.
ยงfn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <F as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <F as Render>::State
Makes a set of DOM nodes rendered from HTML interactive. Read more
ยงasync fn hydrate_async(
self,
cursor: &Cursor,
position: &PositionState,
) -> <F as Render>::State
async fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> <F as Render>::State
Asynchronously makes a set of DOM nodes rendered from HTML interactive. Read more
ยงfn into_owned(self) -> <F as RenderHtml>::Owned
fn into_owned(self) -> <F as RenderHtml>::Owned
Convert into the equivalent value that is
'static
.ยงconst EXISTS: bool = true
const EXISTS: bool = true
Whether this should actually exist in the DOM, if it is the child of an element.
ยงfn to_html_branching(self) -> Stringwhere
Self: Sized,
fn to_html_branching(self) -> Stringwhere
Self: Sized,
Renders a view to HTML with branch markers. This can be used to support libraries that diff
HTML pages against one another, by marking sections of the view that branch to different
types with marker comments.
ยงfn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order(self) -> StreamBuilderwhere
Self: Sized,
Renders a view to an in-order stream of HTML.
ยงfn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_in_order_branching(self) -> StreamBuilderwhere
Self: Sized,
Renders a view to an in-order stream of HTML with branch markers. This can be used to support libraries that diff
HTML pages against one another, by marking sections of the view that branch to different
types with marker comments.
ยงfn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order(self) -> StreamBuilderwhere
Self: Sized,
Renders a view to an out-of-order stream of HTML.
ยงfn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
Renders a view to an out-of-order stream of HTML with branch markers. This can be used to support libraries that diff
HTML pages against one another, by marking sections of the view that branch to different
types with marker comments.
ยง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,
Hydrates using
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,
Hydrates using
RenderHtml::hydrate
, beginning at the given element and position.ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> Source for Twhere
T: AsSubscriberSet + DefinedAt,
impl<T> Source for Twhere
T: AsSubscriberSet + DefinedAt,
ยงfn clear_subscribers(&self)
fn clear_subscribers(&self)
Remove all subscribers from this sourceโs list of dependencies.
ยงfn add_subscriber(&self, subscriber: AnySubscriber)
fn add_subscriber(&self, subscriber: AnySubscriber)
Adds a subscriber to this sourceโs list of dependencies.
ยงfn remove_subscriber(&self, subscriber: &AnySubscriber)
fn remove_subscriber(&self, subscriber: &AnySubscriber)
Removes a subscriber from this sourceโs list of dependencies.
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
ยงimpl<F> ToHref for F
impl<F> ToHref for F
ยงimpl<F, V> ToTemplate for Fwhere
F: ReactiveFunction<Output = V>,
V: ToTemplate,
impl<F, V> ToTemplate for Fwhere
F: ReactiveFunction<Output = V>,
V: ToTemplate,
ยงfn to_template(
buf: &mut String,
class: &mut String,
style: &mut String,
inner_html: &mut String,
position: &mut Position,
)
fn to_template( buf: &mut String, class: &mut String, style: &mut String, inner_html: &mut String, position: &mut Position, )
Renders a view type to a template. This does not take actual view data,
but can be used for constructing part of an HTML
<template>
that corresponds
to a view of a particular type.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
The error for when
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>
Try to cast this collection of color components into a collection of
colors. Read more
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>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
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
Cast a collection of colors into a collection of unsigned integers.
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
Cast this collection of unsigned integers into a collection of colors.
ยง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
The type of the value contained in the signal.
ยง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>
Applies the closure to the value, and returns the result,
or
None
if the signal has already been disposed.ยงfn with_untracked<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U
fn with_untracked<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U
Applies the closure to the value, and returns the result. Read more