pub struct MaybeProp<T, S = SyncStorage>(/* private fields */)
where
T: 'static,
S: Storage<Option<T>> + Storage<SignalTypes<Option<T>, S>>;Expand description
A wrapping type for an optional component prop.
This can either be a signal or a non-reactive value, and may or may not have a value.
In other words, this is an Option<Signal<Option<T>>>, but automatically flattens its getters.
This creates an extremely flexible type for component libraries, etc.
§Examples
let (count, set_count) = signal(Some(2));
let double = |n| n * 2;
let double_count = MaybeProp::derive(move || count.get().map(double));
let memoized_double_count = Memo::new(move |_| count.get().map(double));
let static_value = 5;
// this function takes either a reactive or non-reactive value
fn above_3(arg: &MaybeProp<i32>) -> bool {
// ✅ calling the signal clones and returns the value
// it is a shorthand for arg.get()q
arg.get().map(|arg| arg > 3).unwrap_or(false)
}
assert_eq!(above_3(&None::<i32>.into()), false);
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);Implementations§
Source§impl<T> MaybeProp<T, LocalStorage>
impl<T> MaybeProp<T, LocalStorage>
Sourcepub fn derive_local(
derived_signal: impl Fn() -> Option<T> + 'static,
) -> MaybeProp<T, LocalStorage>
pub fn derive_local( derived_signal: impl Fn() -> Option<T> + 'static, ) -> MaybeProp<T, LocalStorage>
Wraps a derived signal, i.e., any computation that accesses one or more reactive signals.
Trait Implementations§
Source§impl<V, S> AddAnyAttr for MaybeProp<V, S>
impl<V, S> AddAnyAttr for MaybeProp<V, S>
Source§impl<V, S> AttributeValue for MaybeProp<V, S>
impl<V, S> AttributeValue for MaybeProp<V, S>
Source§type AsyncOutput = MaybeProp<V, S>
type AsyncOutput = MaybeProp<V, S>
The type once all async data have loaded.
Source§type State = RenderEffect<<Option<V> as AttributeValue>::State>
type State = RenderEffect<<Option<V> as AttributeValue>::State>
The state that should be retained between building and rebuilding.
Source§type Cloneable = MaybeProp<V, S>
type Cloneable = MaybeProp<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.Source§type CloneableOwned = MaybeProp<V, S>
type CloneableOwned = MaybeProp<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.Source§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>.Source§fn hydrate<const FROM_SERVER: bool>(
self,
key: &str,
el: &Element,
) -> <MaybeProp<V, S> as AttributeValue>::State
fn hydrate<const FROM_SERVER: bool>( self, key: &str, el: &Element, ) -> <MaybeProp<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>.Source§fn build(
self,
el: &Element,
key: &str,
) -> <MaybeProp<V, S> as AttributeValue>::State
fn build( self, el: &Element, key: &str, ) -> <MaybeProp<V, S> as AttributeValue>::State
Adds this attribute to the element during client-side rendering.
Source§fn rebuild(
self,
key: &str,
state: &mut <MaybeProp<V, S> as AttributeValue>::State,
)
fn rebuild( self, key: &str, state: &mut <MaybeProp<V, S> as AttributeValue>::State, )
Applies a new value for the attribute.
Source§fn into_cloneable(self) -> <MaybeProp<V, S> as AttributeValue>::Cloneable
fn into_cloneable(self) -> <MaybeProp<V, S> as AttributeValue>::Cloneable
Converts this attribute into an equivalent that can be cloned.
Source§fn into_cloneable_owned(
self,
) -> <MaybeProp<V, S> as AttributeValue>::CloneableOwned
fn into_cloneable_owned( self, ) -> <MaybeProp<V, S> as AttributeValue>::CloneableOwned
Converts this attributes into an equivalent that can be cloned and is
'static.Source§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.
Source§async fn resolve(self) -> <MaybeProp<V, S> as AttributeValue>::AsyncOutput
async fn resolve(self) -> <MaybeProp<V, S> as AttributeValue>::AsyncOutput
“Resolves” this into a form that is not waiting for any asynchronous data.
impl<T, S> Copy for MaybeProp<T, S>
Source§impl<T, S> DefinedAt for MaybeProp<T, S>
impl<T, S> DefinedAt for MaybeProp<T, S>
Source§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> Eq for MaybeProp<T, S>
Source§impl<T> From<MaybeProp<T, LocalStorage>> for Option<Signal<Option<T>, LocalStorage>>
impl<T> From<MaybeProp<T, LocalStorage>> for Option<Signal<Option<T>, LocalStorage>>
Source§fn from(
value: MaybeProp<T, LocalStorage>,
) -> Option<Signal<Option<T>, LocalStorage>>
fn from( value: MaybeProp<T, LocalStorage>, ) -> Option<Signal<Option<T>, LocalStorage>>
Converts to this type from the input type.
Source§impl<T> From<MaybeSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<MaybeSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§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.
Source§impl<T> From<Memo<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Memo<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: Memo<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Memo<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> From<Memo<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Memo<T, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: Memo<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Memo<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> From<Option<MaybeSignal<Option<T>, LocalStorage>>> for MaybeProp<T, LocalStorage>
impl<T> From<Option<MaybeSignal<Option<T>, LocalStorage>>> for MaybeProp<T, LocalStorage>
Source§fn from(
value: Option<MaybeSignal<Option<T>, LocalStorage>>,
) -> MaybeProp<T, LocalStorage>
fn from( value: Option<MaybeSignal<Option<T>, LocalStorage>>, ) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> From<ReadSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<ReadSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§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.
Source§impl<T> From<ReadSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<ReadSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§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.
Source§impl<T> From<ReadSignal<T>> for MaybeProp<T>
impl<T> From<ReadSignal<T>> for MaybeProp<T>
Source§fn from(value: ReadSignal<T>) -> MaybeProp<T>
fn from(value: ReadSignal<T>) -> MaybeProp<T>
Converts to this type from the input type.
Source§impl<T> From<RwSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<RwSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: RwSignal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: RwSignal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> From<RwSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<RwSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: RwSignal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: RwSignal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
Source§fn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
Source§impl<T> FromLocal<Option<T>> for MaybeProp<T, LocalStorage>
impl<T> FromLocal<Option<T>> for MaybeProp<T, LocalStorage>
Source§fn from_local(value: Option<T>) -> MaybeProp<T, LocalStorage>
fn from_local(value: Option<T>) -> MaybeProp<T, LocalStorage>
Converts between the types.
Source§impl<T> FromLocal<T> for MaybeProp<T, LocalStorage>
impl<T> FromLocal<T> for MaybeProp<T, LocalStorage>
Source§fn from_local(value: T) -> MaybeProp<T, LocalStorage>
fn from_local(value: T) -> MaybeProp<T, LocalStorage>
Converts between the types.
Source§impl<T, S> ReadUntracked for MaybeProp<T, S>
impl<T, S> ReadUntracked for MaybeProp<T, S>
Source§type Value = ReadGuard<Option<T>, SignalReadGuard<Option<T>, S>>
type Value = ReadGuard<Option<T>, SignalReadGuard<Option<T>, S>>
The guard type that will be returned, which can be dereferenced to the value.
Source§fn try_read_untracked(
&self,
) -> Option<<MaybeProp<T, S> as ReadUntracked>::Value>
fn try_read_untracked( &self, ) -> Option<<MaybeProp<T, S> as ReadUntracked>::Value>
Returns the guard, or
None if the signal has already been disposed.Source§fn custom_try_read(
&self,
) -> Option<Option<<MaybeProp<T, S> as ReadUntracked>::Value>>
fn custom_try_read( &self, ) -> Option<Option<<MaybeProp<T, S> as ReadUntracked>::Value>>
This is a backdoor to allow overriding the
Read::try_read implementation despite it being auto implemented. Read moreSource§fn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
Returns the guard. Read more
Source§impl<V, S> Render for MaybeProp<V, S>
impl<V, S> Render for MaybeProp<V, S>
Source§impl<V, S> RenderHtml for MaybeProp<V, S>
impl<V, S> RenderHtml for MaybeProp<V, S>
Source§const MIN_LENGTH: usize = 0
const MIN_LENGTH: usize = 0
The minimum length of HTML created when this view is rendered.
Source§type AsyncOutput = MaybeProp<V, S>
type AsyncOutput = MaybeProp<V, S>
The type of the view after waiting for all asynchronous data to load.
Source§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.
Source§async fn resolve(self) -> <MaybeProp<V, S> as RenderHtml>::AsyncOutput
async fn resolve(self) -> <MaybeProp<V, S> as RenderHtml>::AsyncOutput
Waits for any asynchronous sections of the view to load and returns the output.
Source§fn html_len(&self) -> usize
fn html_len(&self) -> usize
An estimated length for this view, when rendered to HTML. Read more
Source§fn to_html_with_buf(
self,
buf: &mut String,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)
fn to_html_with_buf( self, buf: &mut String, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )
Renders a view to HTML, writing it into the given buffer.
Source§fn to_html_async_with_buf<const OUT_OF_ORDER: bool>(
self,
buf: &mut StreamBuilder,
position: &mut Position,
escape: bool,
mark_branches: bool,
extra_attrs: Vec<AnyAttribute>,
)
fn to_html_async_with_buf<const OUT_OF_ORDER: bool>( self, buf: &mut StreamBuilder, position: &mut Position, escape: bool, mark_branches: bool, extra_attrs: Vec<AnyAttribute>, )
Renders a view into a buffer of (synchronous or asynchronous) HTML chunks.
Source§fn hydrate<const FROM_SERVER: bool>(
self,
cursor: &Cursor,
position: &PositionState,
) -> <MaybeProp<V, S> as Render>::State
fn hydrate<const FROM_SERVER: bool>( self, cursor: &Cursor, position: &PositionState, ) -> <MaybeProp<V, S> as Render>::State
Makes a set of DOM nodes rendered from HTML interactive. Read more
Source§fn into_owned(self) -> <MaybeProp<V, S> as RenderHtml>::Owned
fn into_owned(self) -> <MaybeProp<V, S> as RenderHtml>::Owned
Convert into the equivalent value that is
'static.Source§const EXISTS: bool = true
const EXISTS: bool = true
Whether this should actually exist in the DOM, if it is the child of an element.
Source§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.
Source§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.
Source§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.
Source§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.
Source§fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
fn to_html_stream_out_of_order_branching(self) -> StreamBuilderwhere
Self: Sized,
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.
Source§fn hydrate_async(
self,
cursor: &Cursor,
position: &PositionState,
) -> impl Future<Output = Self::State>
fn hydrate_async( self, cursor: &Cursor, position: &PositionState, ) -> impl Future<Output = Self::State>
Asynchronously makes a set of DOM nodes rendered from HTML interactive. Read more
Source§fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
fn hydrate_from<const FROM_SERVER: bool>(self, el: &Element) -> Self::Statewhere
Self: Sized,
Hydrates using
RenderHtml::hydrate, beginning at the given element.Source§fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
fn hydrate_from_position<const FROM_SERVER: bool>(
self,
el: &Element,
position: Position,
) -> Self::Statewhere
Self: Sized,
Hydrates using
RenderHtml::hydrate, beginning at the given element and position.Source§impl<T, St> Serialize for MaybeProp<T, St>
impl<T, St> Serialize for MaybeProp<T, St>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T, S> StructuralPartialEq for MaybeProp<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for MaybeProp<T, S>
impl<T, S> RefUnwindSafe for MaybeProp<T, S>
impl<T, S> Send for MaybeProp<T, S>
impl<T, S> Sync for MaybeProp<T, S>
impl<T, S> Unpin for MaybeProp<T, S>
impl<T, S> UnsafeUnpin for MaybeProp<T, S>
impl<T, S> UnwindSafe for MaybeProp<T, S>
Blanket Implementations§
Source§impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
impl<V, Key, Sig, T> BindAttribute<Key, Sig, T> for Vwhere
V: AddAnyAttr,
Key: AttributeKey,
Sig: IntoSplitSignal<Value = T>,
T: FromEventTarget + AttributeValue + PartialEq + Sync + 'static,
Signal<BoolOrT<T>>: IntoProperty,
<Sig as IntoSplitSignal>::Read: Get<Value = T> + Send + Sync + Clone + 'static,
<Sig as IntoSplitSignal>::Write: Send + Clone + 'static,
Element: GetValue<T>,
Source§type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
type Output = <V as AddAnyAttr>::Output<Bind<Key, T, <Sig as IntoSplitSignal>::Read, <Sig as IntoSplitSignal>::Write>>
The type of the element with the two-way binding added.
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, K, V> CustomAttribute<K, V> for T
impl<T, K, V> CustomAttribute<K, V> for T
Source§fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>
fn attr(self, key: K, value: V) -> Self::Output<CustomAttr<K, V>>
Adds an HTML attribute by key and value.
Source§impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
impl<V, T, P, D> DirectiveAttribute<T, P, D> for V
Source§type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
type Output = <V as AddAnyAttr>::Output<Directive<T, D, P>>
The type of the element with the directive added.
Source§fn directive(
self,
handler: D,
param: P,
) -> <V as DirectiveAttribute<T, P, D>>::Output
fn directive( self, handler: D, param: P, ) -> <V as DirectiveAttribute<T, P, D>>::Output
Adds a directive to the element, which runs some custom logic in the browser when the element
is created or hydrated.
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<S, T> FromStream<T> for S
impl<S, T> FromStream<T> for S
Source§fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S
fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> S
Creates a signal that contains the latest value of the stream.
Source§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.
Source§impl<T> IntoAny for Twhere
T: Send + RenderHtml,
impl<T> IntoAny for Twhere
T: Send + RenderHtml,
Source§impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
impl<T> IntoAttributeValue for Twhere
T: AttributeValue,
Source§fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
fn into_attribute_value(self) -> <T as IntoAttributeValue>::Output
Consumes this value, transforming it into an attribute value.
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 moreSource§impl<T> IntoMaybeErased for Twhere
T: RenderHtml,
impl<T> IntoMaybeErased for Twhere
T: RenderHtml,
Source§fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
fn into_maybe_erased(self) -> <T as IntoMaybeErased>::Output
Converts the view into a type-erased view if in erased mode.
Source§impl<T, S> IntoOptionGetter<T, SignalMarker> for S
impl<T, S> IntoOptionGetter<T, SignalMarker> for S
Source§fn into_option_getter(self) -> OptionGetter<T>
fn into_option_getter(self) -> OptionGetter<T>
Converts the given value into an
OptionGetter.Source§impl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for Iwhere
I: Into<T>,
impl<T, I> IntoReactiveValue<T, __IntoReactiveValueMarkerBaseCase> for Iwhere
I: Into<T>,
Source§fn into_reactive_value(self) -> T
fn into_reactive_value(self) -> T
Converts
self into a T.Source§impl<T> IntoRender for Twhere
T: Render,
impl<T> IntoRender for Twhere
T: Render,
Source§fn into_render(self) -> <T as IntoRender>::Output
fn into_render(self) -> <T as IntoRender>::Output
Consumes this value, transforming it into the renderable type.
Source§impl<T> Read for Twhere
T: Track + ReadUntracked,
impl<T> Read for Twhere
T: Track + ReadUntracked,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
Source§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
Source§impl<T> With for Twhere
T: Read,
impl<T> With for Twhere
T: Read,
Source§type Value = <<T as Read>::Value as Deref>::Target
type Value = <<T as Read>::Value as Deref>::Target
The type of the value contained in the signal.
Source§impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
Source§type Value = <<T as ReadUntracked>::Value as Deref>::Target
type Value = <<T as ReadUntracked>::Value as Deref>::Target
The type of the value contained in the signal.
Source§fn try_with_untracked<U>(
&self,
fun: impl FnOnce(&<T as WithUntracked>::Value) -> U,
) -> Option<U>
fn try_with_untracked<U>( &self, fun: impl FnOnce(&<T as WithUntracked>::Value) -> U, ) -> Option<U>
Applies the closure to the value, and returns the result,
or
None if the signal has already been disposed.