Struct MaybeProp
pub struct MaybeProp<T, S = SyncStorage>(pub(crate) Option<Signal<Option<T>, S>>)
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);Tuple Fieldsยง
ยง0: Option<Signal<Option<T>, S>>Implementationsยง
ยงimpl<T> MaybeProp<T, LocalStorage>
impl<T> MaybeProp<T, LocalStorage>
pub 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ยง
ยงimpl<T, S> DefinedAt for MaybeProp<T, S>
impl<T, S> DefinedAt for MaybeProp<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> From<MaybeProp<T, LocalStorage>> for Option<Signal<Option<T>, LocalStorage>>
impl<T> From<MaybeProp<T, LocalStorage>> for Option<Signal<Option<T>, LocalStorage>>
ยง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.
ยง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<Memo<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Memo<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
ยง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.
ยงimpl<T> From<Memo<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Memo<T, LocalStorage>> for MaybeProp<T, LocalStorage>
ยง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.
ยงimpl<T> From<Option<MaybeSignal<Option<T>, LocalStorage>>> for MaybeProp<T, LocalStorage>
impl<T> From<Option<MaybeSignal<Option<T>, LocalStorage>>> for MaybeProp<T, LocalStorage>
ยง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.
ยง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, 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<RwSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<RwSignal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
ยง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.
ยงimpl<T> From<RwSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<RwSignal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
ยง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.
ยงimpl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Signal<Option<T>, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Signal<Option<T>, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
ยงimpl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
impl<T> From<Signal<T, LocalStorage>> for MaybeProp<T, LocalStorage>
ยงfn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
fn from(value: Signal<T, LocalStorage>) -> MaybeProp<T, LocalStorage>
Converts to this type from the input type.
ยงimpl<T> FromLocal<Option<T>> for MaybeProp<T, LocalStorage>
impl<T> FromLocal<Option<T>> for MaybeProp<T, LocalStorage>
ยงfn from_local(value: Option<T>) -> MaybeProp<T, LocalStorage>
fn from_local(value: Option<T>) -> MaybeProp<T, LocalStorage>
Converts between the types.
ยงimpl<T> FromLocal<T> for MaybeProp<T, LocalStorage>
impl<T> FromLocal<T> for MaybeProp<T, LocalStorage>
ยงfn from_local(value: T) -> MaybeProp<T, LocalStorage>
fn from_local(value: T) -> MaybeProp<T, LocalStorage>
Converts between the types.
ยงimpl IntoClass for MaybeProp<String>
Available on non-crate feature nightly only.
impl IntoClass for MaybeProp<String>
Available on non-crate feature
nightly only.fn into_class(self) -> Class
ยงimpl<T, S> ReadUntracked for MaybeProp<T, S>
impl<T, S> ReadUntracked for MaybeProp<T, S>
ยง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.
ยง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.ยง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 moreยงfn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
Returns the guard. Read more
ยงimpl<T, St> Serialize for MaybeProp<T, St>
impl<T, St> Serialize for MaybeProp<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 MaybeProp<T, S>
impl<T, S> Eq for MaybeProp<T, S>
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> UnwindSafe for MaybeProp<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.
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.
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> 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.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> 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.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, 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.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