Enum MaybeSignal
pub enum MaybeSignal<T, S = SyncStorage>where
T: 'static,
S: Storage<T>,{
Static(T),
Dynamic(Signal<T, S>),
}๐Deprecated since 0.7.0-rc3:
MaybeSignal<T> is deprecated in favour of Signal<T> which is Copy, now has a more efficient From<T> implementation and other benefits in 0.7.Expand description
A wrapper for a value that is either T or Signal<T>.
This allows you to create APIs that take either a reactive or a non-reactive value of the same type. This is especially useful for component properties.
let (count, set_count) = signal(2);
let double_count = MaybeSignal::derive(move || count.get() * 2);
let memoized_double_count = Memo::new(move |_| count.get() * 2);
let static_value = 5;
// this function takes either a reactive or non-reactive value
fn above_3(arg: &MaybeSignal<i32>) -> bool {
// โ
calling the signal clones and returns the value
// it is a shorthand for arg.get()
arg.get() > 3
}
assert_eq!(above_3(&static_value.into()), true);
assert_eq!(above_3(&count.into()), false);
assert_eq!(above_3(&double_count), true);
assert_eq!(above_3(&memoized_double_count.into()), true);Variantsยง
Static(T)
๐Deprecated since 0.7.0-rc3:
MaybeSignal<T> is deprecated in favour of Signal<T> which is Copy, now has a more efficient From<T> implementation and other benefits in 0.7.An unchanging value of type T.
Dynamic(Signal<T, S>)
๐Deprecated since 0.7.0-rc3:
MaybeSignal<T> is deprecated in favour of Signal<T> which is Copy, now has a more efficient From<T> implementation and other benefits in 0.7.A reactive signal that contains a value of type T.
Implementationsยง
ยงimpl<T> MaybeSignal<T>
impl<T> MaybeSignal<T>
pub fn derive(
derived_signal: impl Fn() -> T + Send + Sync + 'static,
) -> MaybeSignal<T>
pub fn derive( derived_signal: impl Fn() -> T + Send + Sync + 'static, ) -> MaybeSignal<T>
Wraps a derived signal, i.e., any computation that accesses one or more reactive signals.
ยงimpl<T> MaybeSignal<T, LocalStorage>
impl<T> MaybeSignal<T, LocalStorage>
pub fn derive_local(
derived_signal: impl Fn() -> T + 'static,
) -> MaybeSignal<T, LocalStorage>
pub fn derive_local( derived_signal: impl Fn() -> T + 'static, ) -> MaybeSignal<T, LocalStorage>
Wraps a derived signal, i.e., any computation that accesses one or more reactive signals.
Trait Implementationsยง
ยงimpl<V, S> AddAnyAttr for MaybeSignal<V, S>
impl<V, S> AddAnyAttr for MaybeSignal<V, S>
ยงtype Output<SomeNewAttr: Attribute> = MaybeSignal<V, S>
type Output<SomeNewAttr: Attribute> = MaybeSignal<V, S>
The new type once the attribute has been added.
ยงfn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <MaybeSignal<V, S> as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
fn add_any_attr<NewAttr>(
self,
_attr: NewAttr,
) -> <MaybeSignal<V, S> as AddAnyAttr>::Output<NewAttr>where
NewAttr: Attribute,
Adds an attribute to the view.
ยงimpl<V, S> AttributeValue for MaybeSignal<V, S>
impl<V, S> AttributeValue for MaybeSignal<V, S>
ยงtype AsyncOutput = MaybeSignal<V, S>
type AsyncOutput = MaybeSignal<V, S>
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 = MaybeSignal<V, S>
type Cloneable = MaybeSignal<V, S>
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 = MaybeSignal<V, S>
type CloneableOwned = MaybeSignal<V, S>
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,
) -> <MaybeSignal<V, S> as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <MaybeSignal<V, S> 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,
) -> <MaybeSignal<V, S> as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <MaybeSignal<V, S> as AttributeValue>::State
Adds this attribute to the element during client-side rendering.
ยงfn rebuild(
self,
key: &str,
state: &mut <MaybeSignal<V, S> as AttributeValue>::State,
)
fn rebuild( self, key: &str, state: &mut <MaybeSignal<V, S> as AttributeValue>::State, )
Applies a new value for the attribute.
ยงfn into_cloneable(self) -> <MaybeSignal<V, S> as AttributeValue>::Cloneable
fn into_cloneable(self) -> <MaybeSignal<V, S> as AttributeValue>::Cloneable
Converts this attribute into an equivalent that can be cloned.
ยงfn into_cloneable_owned(
self,
) -> <MaybeSignal<V, S> as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeSignal<V, S> 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.
ยงasync fn resolve(self) -> <MaybeSignal<V, S> as AttributeValue>::AsyncOutput
async fn resolve(self) -> <MaybeSignal<V, S> as AttributeValue>::AsyncOutput
โResolvesโ this into a form that is not waiting for any asynchronous data.
ยงimpl<T, S> Clone for MaybeSignal<T, S>
impl<T, S> Clone for MaybeSignal<T, S>
ยงfn clone(&self) -> MaybeSignal<T, S>
fn clone(&self) -> MaybeSignal<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 MaybeSignal<T, S>
impl<T, S> Debug for MaybeSignal<T, S>
ยงimpl<T, S> Default for MaybeSignal<T, S>
impl<T, S> Default for MaybeSignal<T, S>
ยงfn default() -> MaybeSignal<T, S>
fn default() -> MaybeSignal<T, S>
Returns the โdefault valueโ for a type. Read more
ยงimpl<T, S> DefinedAt for MaybeSignal<T, S>where
S: Storage<T>,
impl<T, S> DefinedAt for MaybeSignal<T, S>where
S: Storage<T>,
ยง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<'de, T, St> Deserialize<'de> for MaybeSignal<T, St>where
T: Deserialize<'de>,
St: Storage<T>,
impl<'de, T, St> Deserialize<'de> for MaybeSignal<T, St>where
T: Deserialize<'de>,
St: Storage<T>,
ยงfn deserialize<D>(
deserializer: D,
) -> Result<MaybeSignal<T, St>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MaybeSignal<T, St>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
ยงimpl<S> From<&str> for MaybeSignal<String, S>
impl<S> From<&str> for MaybeSignal<String, S>
ยงfn from(value: &str) -> MaybeSignal<String, S>
fn from(value: &str) -> MaybeSignal<String, S>
Converts to this type from the input type.
ยงimpl<T> From<ArcMemo<T>> for MaybeSignal<T>
impl<T> From<ArcMemo<T>> for MaybeSignal<T>
ยงfn from(value: ArcMemo<T>) -> MaybeSignal<T>
fn from(value: ArcMemo<T>) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<ArcReadSignal<T>> for MaybeSignal<T>
impl<T> From<ArcReadSignal<T>> for MaybeSignal<T>
ยงfn from(value: ArcReadSignal<T>) -> MaybeSignal<T>
fn from(value: ArcReadSignal<T>) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<ArcRwSignal<T>> for MaybeSignal<T>
impl<T> From<ArcRwSignal<T>> for MaybeSignal<T>
ยงfn from(value: ArcRwSignal<T>) -> MaybeSignal<T>
fn from(value: ArcRwSignal<T>) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<MaybeSignal<Option<T>>> for MaybeProp<T>
impl<T> From<MaybeSignal<Option<T>>> for MaybeProp<T>
ยงfn from(value: MaybeSignal<Option<T>>) -> MaybeProp<T>
fn from(value: MaybeSignal<Option<T>>) -> MaybeProp<T>
Converts to this type from the input type.
ยงimpl<T> From<MaybeSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<MaybeSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(
value: MaybeSignal<Option<T>, LocalStorage>,
) -> MaybeProp<T, LocalStorage>
fn from( value: MaybeSignal<Option<T>, LocalStorage>, ) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
ยง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>>
Converts to this type from the input type.
ยง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>
Converts to this type from the input type.
ยง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>
Converts to this type from the input type.
ยง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>
Converts to this type from the input type.
ยงimpl<V, S> From<MaybeSignal<V, S>> for TextProp
impl<V, S> From<MaybeSignal<V, S>> for TextProp
ยงfn from(s: MaybeSignal<V, S>) -> TextProp
fn from(s: MaybeSignal<V, S>) -> TextProp
Converts to this type from the input type.
ยงimpl<T> From<Memo<T>> for MaybeSignal<T>
impl<T> From<Memo<T>> for MaybeSignal<T>
ยงfn from(value: Memo<T>) -> MaybeSignal<T>
fn from(value: Memo<T>) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<Memo<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
impl<T> From<Memo<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
ยงfn from(value: Memo<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
fn from(value: Memo<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
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, 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<RwSignal<T>> for MaybeSignal<T>
impl<T> From<RwSignal<T>> for MaybeSignal<T>
ยงfn from(value: RwSignal<T>) -> MaybeSignal<T>
fn from(value: RwSignal<T>) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> From<RwSignal<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
impl<T> From<RwSignal<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
ยงfn from(value: RwSignal<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
fn from(value: RwSignal<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
Converts to this type from the input type.
ยง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>
Converts to this type from the input type.
ยงimpl<T> From<T> for MaybeSignal<T>where
SyncStorage: Storage<T>,
impl<T> From<T> for MaybeSignal<T>where
SyncStorage: Storage<T>,
ยงfn from(value: T) -> MaybeSignal<T>
fn from(value: T) -> MaybeSignal<T>
Converts to this type from the input type.
ยงimpl<T> FromLocal<ArcMemo<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
impl<T> FromLocal<ArcMemo<T, LocalStorage>> for MaybeSignal<T, LocalStorage>
ยงfn from_local(value: ArcMemo<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
fn from_local(value: ArcMemo<T, LocalStorage>) -> MaybeSignal<T, LocalStorage>
Converts between the types.
ยงimpl<T> FromLocal<ArcReadSignal<T>> for MaybeSignal<T, LocalStorage>
impl<T> FromLocal<ArcReadSignal<T>> for MaybeSignal<T, LocalStorage>
ยงfn from_local(value: ArcReadSignal<T>) -> MaybeSignal<T, LocalStorage>
fn from_local(value: ArcReadSignal<T>) -> MaybeSignal<T, LocalStorage>
Converts between the types.
ยงimpl<T> FromLocal<ArcRwSignal<T>> for MaybeSignal<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcRwSignal<T>> for MaybeSignal<T, LocalStorage>where
T: 'static,
ยงfn from_local(value: ArcRwSignal<T>) -> MaybeSignal<T, LocalStorage>
fn from_local(value: ArcRwSignal<T>) -> MaybeSignal<T, LocalStorage>
Converts between the types.
ยงimpl<T> FromLocal<T> for MaybeSignal<T, LocalStorage>where
LocalStorage: Storage<T>,
impl<T> FromLocal<T> for MaybeSignal<T, LocalStorage>where
LocalStorage: Storage<T>,
ยงfn from_local(value: T) -> MaybeSignal<T, LocalStorage>
fn from_local(value: T) -> MaybeSignal<T, LocalStorage>
Converts between the types.
ยงimpl<V, S> InnerHtmlValue for MaybeSignal<V, S>
impl<V, S> InnerHtmlValue for MaybeSignal<V, S>
ยงtype AsyncOutput = MaybeSignal<V, S>
type AsyncOutput = MaybeSignal<V, S>
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 Cloneable = MaybeSignal<V, S>
type Cloneable = MaybeSignal<V, S>
An equivalent value that can be cloned.
ยงtype CloneableOwned = MaybeSignal<V, S>
type CloneableOwned = MaybeSignal<V, S>
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,
) -> <MaybeSignal<V, S> as InnerHtmlValue>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <MaybeSignal<V, S> 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) -> <MaybeSignal<V, S> as InnerHtmlValue>::State
fn build(self, el: &Element) -> <MaybeSignal<V, S> as InnerHtmlValue>::State
Adds this class to the element during client-side rendering.
ยงfn rebuild(self, state: &mut <MaybeSignal<V, S> as InnerHtmlValue>::State)
fn rebuild(self, state: &mut <MaybeSignal<V, S> as InnerHtmlValue>::State)
Updates the value.
ยงfn into_cloneable(self) -> <MaybeSignal<V, S> as InnerHtmlValue>::Cloneable
fn into_cloneable(self) -> <MaybeSignal<V, S> as InnerHtmlValue>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(
self,
) -> <MaybeSignal<V, S> as InnerHtmlValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeSignal<V, S> 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.
ยงasync fn resolve(self) -> <MaybeSignal<V, S> as InnerHtmlValue>::AsyncOutput
async fn resolve(self) -> <MaybeSignal<V, S> as InnerHtmlValue>::AsyncOutput
โResolvesโ this into a type that is not waiting for any asynchronous data.
ยงimpl<V, S> IntoClass for MaybeSignal<V, S>
impl<V, S> IntoClass for MaybeSignal<V, S>
ยงtype AsyncOutput = MaybeSignal<V, S>
type AsyncOutput = MaybeSignal<V, S>
The type after all async data have resolved.
ยงtype State = RenderEffect<<V as IntoClass>::State>
type State = RenderEffect<<V as IntoClass>::State>
The view state retained between building and rebuilding.
ยงtype Cloneable = MaybeSignal<V, S>
type Cloneable = MaybeSignal<V, S>
An equivalent value that can be cloned.
ยงtype CloneableOwned = MaybeSignal<V, S>
type CloneableOwned = MaybeSignal<V, S>
An equivalent value that can be cloned and is
'static.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <MaybeSignal<V, S> as IntoClass>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <MaybeSignal<V, S> 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) -> <MaybeSignal<V, S> as IntoClass>::State
fn build(self, el: &Element) -> <MaybeSignal<V, S> as IntoClass>::State
Adds this class to the element during client-side rendering.
ยงfn rebuild(self, state: &mut <MaybeSignal<V, S> as IntoClass>::State)
fn rebuild(self, state: &mut <MaybeSignal<V, S> as IntoClass>::State)
Updates the value.
ยงfn into_cloneable(self) -> <MaybeSignal<V, S> as IntoClass>::Cloneable
fn into_cloneable(self) -> <MaybeSignal<V, S> as IntoClass>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(
self,
) -> <MaybeSignal<V, S> as IntoClass>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeSignal<V, S> 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) -> <MaybeSignal<V, S> as IntoClass>::AsyncOutput
async fn resolve(self) -> <MaybeSignal<V, S> as IntoClass>::AsyncOutput
โResolvesโ this into a type that is not waiting for any asynchronous data.
ยงfn reset(state: &mut <MaybeSignal<V, S> as IntoClass>::State)
fn reset(state: &mut <MaybeSignal<V, S> 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 should_overwrite(&self) -> bool
fn should_overwrite(&self) -> bool
Whether this class attribute should overwrite previous class values.
Returns
true for class="..." attributes, false for class:name=value directives.ยงfn to_template(class: &mut String)
fn to_template(class: &mut String)
Renders the class to HTML for a
<template>.ยงimpl<V, S> IntoProperty for MaybeSignal<V, S>
impl<V, S> IntoProperty for MaybeSignal<V, S>
ยงtype State = RenderEffect<<V as IntoProperty>::State>
type State = RenderEffect<<V as IntoProperty>::State>
The view state retained between building and rebuilding.
ยงtype Cloneable = MaybeSignal<V, S>
type Cloneable = MaybeSignal<V, S>
An equivalent value that can be cloned.
ยงtype CloneableOwned = MaybeSignal<V, S>
type CloneableOwned = MaybeSignal<V, S>
An equivalent value that can be cloned and is
'static.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
key: &str,
) -> <MaybeSignal<V, S> as IntoProperty>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, key: &str, ) -> <MaybeSignal<V, S> as IntoProperty>::State
Adds the property on an element created from HTML.
ยงfn build(
self,
el: &Element,
key: &str,
) -> <MaybeSignal<V, S> as IntoProperty>::State
fn build( self, el: &Element, key: &str, ) -> <MaybeSignal<V, S> as IntoProperty>::State
Adds the property during client-side rendering.
ยงfn rebuild(
self,
state: &mut <MaybeSignal<V, S> as IntoProperty>::State,
key: &str,
)
fn rebuild( self, state: &mut <MaybeSignal<V, S> as IntoProperty>::State, key: &str, )
Updates the property with a new value.
ยงfn into_cloneable(self) -> <MaybeSignal<V, S> as IntoProperty>::Cloneable
fn into_cloneable(self) -> <MaybeSignal<V, S> as IntoProperty>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(
self,
) -> <MaybeSignal<V, S> as IntoProperty>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeSignal<V, S> as IntoProperty>::CloneableOwned
Converts this to a cloneable, owned type.
ยงimpl<V, S> IntoStyle for MaybeSignal<V, S>
impl<V, S> IntoStyle for MaybeSignal<V, S>
ยงtype AsyncOutput = MaybeSignal<V, S>
type AsyncOutput = MaybeSignal<V, S>
The type after all async data have resolved.
ยงtype State = RenderEffect<<V as IntoStyle>::State>
type State = RenderEffect<<V as IntoStyle>::State>
The view state retained between building and rebuilding.
ยงtype Cloneable = MaybeSignal<V, S>
type Cloneable = MaybeSignal<V, S>
An equivalent value that can be cloned.
ยงtype CloneableOwned = MaybeSignal<V, S>
type CloneableOwned = MaybeSignal<V, S>
An equivalent value that can be cloned and is
'static.ยงfn hydrate<const FROM_SERVER: bool>(
self,
el: &Element,
) -> <MaybeSignal<V, S> as IntoStyle>::State
fn hydrate<const FROM_SERVER: bool>( self, el: &Element, ) -> <MaybeSignal<V, S> 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) -> <MaybeSignal<V, S> as IntoStyle>::State
fn build(self, el: &Element) -> <MaybeSignal<V, S> as IntoStyle>::State
Adds this style to the element during client-side rendering.
ยงfn rebuild(self, state: &mut <MaybeSignal<V, S> as IntoStyle>::State)
fn rebuild(self, state: &mut <MaybeSignal<V, S> as IntoStyle>::State)
Updates the value.
ยงfn into_cloneable(self) -> <MaybeSignal<V, S> as IntoStyle>::Cloneable
fn into_cloneable(self) -> <MaybeSignal<V, S> as IntoStyle>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(
self,
) -> <MaybeSignal<V, S> as IntoStyle>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeSignal<V, S> 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.
ยงasync fn resolve(self) -> <MaybeSignal<V, S> as IntoStyle>::AsyncOutput
async fn resolve(self) -> <MaybeSignal<V, S> as IntoStyle>::AsyncOutput
โResolvesโ this into a type that is not waiting for any asynchronous data.
ยงfn reset(state: &mut <MaybeSignal<V, S> as IntoStyle>::State)
fn reset(state: &mut <MaybeSignal<V, S> as IntoStyle>::State)
Reset the styling to the state before this style was added.
ยงimpl<V, S> IntoStyleValue for MaybeSignal<V, S>
impl<V, S> IntoStyleValue for MaybeSignal<V, S>
ยงtype AsyncOutput = MaybeSignal<V, S>
type AsyncOutput = MaybeSignal<V, S>
The type after all async data have resolved.
ยงtype State = (Arc<str>, RenderEffect<<V as IntoStyleValue>::State>)
type State = (Arc<str>, RenderEffect<<V as IntoStyleValue>::State>)
The view state retained between building and rebuilding.
ยงtype Cloneable = MaybeSignal<V, S>
type Cloneable = MaybeSignal<V, S>
An equivalent value that can be cloned.
ยงtype CloneableOwned = MaybeSignal<V, S>
type CloneableOwned = MaybeSignal<V, S>
An equivalent value that can be cloned and is
'static.ยงfn build(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <MaybeSignal<V, S> as IntoStyleValue>::State
fn build( self, style: &CssStyleDeclaration, name: &str, ) -> <MaybeSignal<V, S> as IntoStyleValue>::State
Adds this style to the element during client-side rendering.
ยงfn rebuild(
self,
style: &CssStyleDeclaration,
name: &str,
state: &mut <MaybeSignal<V, S> as IntoStyleValue>::State,
)
fn rebuild( self, style: &CssStyleDeclaration, name: &str, state: &mut <MaybeSignal<V, S> as IntoStyleValue>::State, )
Updates the value.
ยงfn hydrate(
self,
style: &CssStyleDeclaration,
name: &str,
) -> <MaybeSignal<V, S> as IntoStyleValue>::State
fn hydrate( self, style: &CssStyleDeclaration, name: &str, ) -> <MaybeSignal<V, S> 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) -> <MaybeSignal<V, S> as IntoStyleValue>::Cloneable
fn into_cloneable(self) -> <MaybeSignal<V, S> as IntoStyleValue>::Cloneable
Converts this to a cloneable type.
ยงfn into_cloneable_owned(
self,
) -> <MaybeSignal<V, S> as IntoStyleValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeSignal<V, S> 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.
ยงasync fn resolve(self) -> <MaybeSignal<V, S> as IntoStyleValue>::AsyncOutput
async fn resolve(self) -> <MaybeSignal<V, S> as IntoStyleValue>::AsyncOutput
โResolvesโ this into a type that is not waiting for any asynchronous data.
ยงimpl<T, S> PartialEq for MaybeSignal<T, S>
impl<T, S> PartialEq for MaybeSignal<T, S>
ยงimpl<T, S> ReadUntracked for MaybeSignal<T, S>
impl<T, S> ReadUntracked for MaybeSignal<T, S>
ยงtype Value = ReadGuard<T, SignalReadGuard<T, S>>
type Value = ReadGuard<T, SignalReadGuard<T, S>>
The guard type that will be returned, which can be dereferenced to the value.
ยงfn try_read_untracked(
&self,
) -> Option<<MaybeSignal<T, S> as ReadUntracked>::Value>
fn try_read_untracked( &self, ) -> Option<<MaybeSignal<T, S> as ReadUntracked>::Value>
Returns the guard, or
None if the signal has already been disposed.ยงfn custom_try_read(
&self,
) -> Option<Option<<MaybeSignal<T, S> as ReadUntracked>::Value>>
fn custom_try_read( &self, ) -> Option<Option<<MaybeSignal<T, S> as ReadUntracked>::Value>>
This is a backdoor to allow overriding the
Read::try_read implementation despite it being auto implemented. Read moreยงfn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
Returns the guard. Read more
ยงimpl<V, S> Render for MaybeSignal<V, S>
impl<V, S> Render for MaybeSignal<V, S>
ยงtype State = RenderEffectState<<V as Render>::State>
type State = RenderEffectState<<V as Render>::State>
The โview stateโ for this type, which can be retained between updates. Read more
ยงfn build(self) -> <MaybeSignal<V, S> as Render>::State
fn build(self) -> <MaybeSignal<V, S> as Render>::State
Creates the view for the first time, without hydrating from existing HTML.
ยงfn rebuild(self, state: &mut <MaybeSignal<V, S> as Render>::State)
fn rebuild(self, state: &mut <MaybeSignal<V, S> as Render>::State)
Updates the view with new data.
ยงimpl<V, S> RenderHtml for MaybeSignal<V, S>
impl<V, S> RenderHtml for MaybeSignal<V, S>
ยงconst MIN_LENGTH: usize = 0usize
const MIN_LENGTH: usize = 0usize
The minimum length of HTML created when this view is rendered.
ยงtype AsyncOutput = MaybeSignal<V, S>
type AsyncOutput = MaybeSignal<V, S>
The type of the view after waiting for all asynchronous data to load.
ยงtype Owned = MaybeSignal<V, S>
type Owned = MaybeSignal<V, S>
An equivalent value that is
'static.ยง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) -> <MaybeSignal<V, S> as RenderHtml>::AsyncOutput
async fn resolve(self) -> <MaybeSignal<V, S> 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>,
)where
MaybeSignal<V, S>: Sized,
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>,
)where
MaybeSignal<V, S>: Sized,
Renders a view into a buffer of (synchronous or asynchronous) HTML chunks.
ยงfn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <MaybeSignal<V, S> as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <MaybeSignal<V, S> as Render>::State
Makes a set of DOM nodes rendered from HTML interactive. Read more
ยงfn into_owned(self) -> <MaybeSignal<V, S> as RenderHtml>::Owned
fn into_owned(self) -> <MaybeSignal<V, S> 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_async(
self,
cursor: &Cursor,
position: &PositionState,
) -> impl Future<Output = Self::State>
fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> impl Future<Output = Self::State>
Asynchronously makes a set of DOM nodes rendered from HTML interactive. Read more
ยง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, St> Serialize for MaybeSignal<T, St>
impl<T, St> Serialize for MaybeSignal<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> Track for MaybeSignal<T, S>
impl<T, S> Track for MaybeSignal<T, S>
impl<T, S> Copy for MaybeSignal<T, S>
impl<T, S> Eq for MaybeSignal<T, S>
impl<T, S> StructuralPartialEq for MaybeSignal<T, S>where
T: 'static,
S: Storage<T>,
Auto Trait Implementationsยง
impl<T, S> Freeze for MaybeSignal<T, S>where
T: Freeze,
impl<T, S> RefUnwindSafe for MaybeSignal<T, S>where
T: RefUnwindSafe,
impl<T, S> Send for MaybeSignal<T, S>where
T: Send,
impl<T, S> Sync for MaybeSignal<T, S>where
T: Sync,
impl<T, S> Unpin for MaybeSignal<T, S>where
T: Unpin,
impl<T, S> UnwindSafe for MaybeSignal<T, S>where
T: UnwindSafe,
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.
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<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
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.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
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<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<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.ยง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
Checks if this value is equivalent to the given key. Read more
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.ยงimpl<T> FromFormData for Twhere
T: DeserializeOwned,
impl<T> FromFormData for Twhere
T: DeserializeOwned,
ยงfn from_event(ev: &Event) -> Result<T, FromFormDataError>
fn from_event(ev: &Event) -> Result<T, FromFormDataError>
Tries to deserialize the data, given only the
submit event.ยงfn from_form_data(form_data: &FormData) -> Result<T, Error>
fn from_form_data(form_data: &FormData) -> Result<T, Error>
Tries to deserialize the data, given the actual form data.
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<T> Hexable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> Hexable for Twhere
T: Serialize + for<'de> Deserialize<'de>,
ยง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.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<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>
Converts the given value into an
OptionGetter.ยง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
Converts
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
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<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
Borrows the value.
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
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