Skip to main content

Computed

Struct Computed 

Source
pub struct Computed<T>(/* private fields */);
Expand description

A wrapper around a boxed implementation of the ComputedImpl trait.

This type represents a computation that can be evaluated to produce a result of type T. The computation is stored as a boxed trait object, allowing for dynamic dispatch.

Implementations§

Source§

impl<T> Computed<T>

Source

pub fn new<C>(value: C) -> Computed<T>
where C: Signal<Output = T> + Clone + 'static,

Creates a new Computed<T> from a value that implements Compute<Output = T>.

The provided value is boxed and stored internally.

Source§

impl<T> Computed<T>
where T: 'static + Clone,

Source

pub fn constant(value: T) -> Computed<T>

Creates a new constant computation with the provided value.

This is a convenience wrapper around Computed::new(constant(value)).

Trait Implementations§

Source§

impl<T, RHS> Add<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Add<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Add<<RHS as Signal>::Output>>::Output, <T as Add<<RHS as Signal>::Output>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: RHS) -> <Computed<T> as Add<RHS>>::Output

Performs the + operation. Read more
Source§

impl<T, RHS> BitAnd<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: BitAnd<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as BitAnd<<RHS as Signal>::Output>>::Output, <T as BitAnd<<RHS as Signal>::Output>>::Output>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: RHS) -> <Computed<T> as BitAnd<RHS>>::Output

Performs the & operation. Read more
Source§

impl<T, RHS> BitOr<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: BitOr<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as BitOr<<RHS as Signal>::Output>>::Output, <T as BitOr<<RHS as Signal>::Output>>::Output>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: RHS) -> <Computed<T> as BitOr<RHS>>::Output

Performs the | operation. Read more
Source§

impl<T, RHS> BitXor<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: BitXor<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as BitXor<<RHS as Signal>::Output>>::Output, <T as BitXor<<RHS as Signal>::Output>>::Output>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: RHS) -> <Computed<T> as BitXor<RHS>>::Output

Performs the ^ operation. Read more
Source§

impl<T> Clone for Computed<T>
where T: 'static,

Source§

fn clone(&self) -> Computed<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for Computed<T>

Implements Debug for Computed<T>.

This just outputs the type name rather than any internal details.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> Default for Computed<T>
where T: 'static + Clone + Default,

Implements Default for Computed<T> when T implements Default.

This creates a constant computation with the default value of T.

Source§

fn default() -> Computed<T>

Returns the “default value” for a type. Read more
Source§

impl<T, RHS> Div<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Div<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Div<<RHS as Signal>::Output>>::Output, <T as Div<<RHS as Signal>::Output>>::Output>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: RHS) -> <Computed<T> as Div<RHS>>::Output

Performs the / operation. Read more
Source§

impl<T> From<Binding<T>> for Computed<T>

Source§

fn from(val: Binding<T>) -> Computed<T>

Converts to this type from the input type.
Source§

impl<T, RHS> Mul<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Mul<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Mul<<RHS as Signal>::Output>>::Output, <T as Mul<<RHS as Signal>::Output>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: RHS) -> <Computed<T> as Mul<RHS>>::Output

Performs the * operation. Read more
Source§

impl<T> Neg for Computed<T>
where Computed<T>: Signal<Output = T>, T: Neg + Clone + 'static,

Source§

type Output = Map<Computed<T>, fn(T) -> <T as Neg>::Output, <T as Neg>::Output>

The resulting type after applying the - operator.
Source§

fn neg(self) -> <Computed<T> as Neg>::Output

Performs the unary - operation. Read more
Source§

impl<T> Not for Computed<T>
where Computed<T>: Signal<Output = bool>,

Source§

type Output = Map<Computed<T>, fn(bool) -> bool, bool>

The resulting type after applying the ! operator.
Source§

fn not(self) -> <Computed<T> as Not>::Output

Performs the unary ! operation. Read more
Source§

impl<T, RHS> Rem<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Rem<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Rem<<RHS as Signal>::Output>>::Output, <T as Rem<<RHS as Signal>::Output>>::Output>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: RHS) -> <Computed<T> as Rem<RHS>>::Output

Performs the % operation. Read more
Source§

impl<T, RHS> Shl<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Shl<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Shl<<RHS as Signal>::Output>>::Output, <T as Shl<<RHS as Signal>::Output>>::Output>

The resulting type after applying the << operator.
Source§

fn shl(self, rhs: RHS) -> <Computed<T> as Shl<RHS>>::Output

Performs the << operation. Read more
Source§

impl<T, RHS> Shr<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Shr<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Shr<<RHS as Signal>::Output>>::Output, <T as Shr<<RHS as Signal>::Output>>::Output>

The resulting type after applying the >> operator.
Source§

fn shr(self, rhs: RHS) -> <Computed<T> as Shr<RHS>>::Output

Performs the >> operation. Read more
Source§

impl<T> Signal for Computed<T>
where T: 'static,

Implements Compute for Computed<T>.

This delegates to the internal boxed implementation.

Source§

type Output = T

The type of value produced by this computation.
Source§

type Guard = Box<dyn WatcherGuard>

The guard type returned by the watch method that manages watcher lifecycle.
Source§

fn get(&self) -> <Computed<T> as Signal>::Output

Execute the computation and return the current value.
Source§

fn identity(&self) -> Option<SignalIdentity>

Returns the stable semantic identity of this signal, when one exists. Read more
Source§

fn watch( &self, watcher: impl Fn(Context<<Computed<T> as Signal>::Output>) + 'static, ) -> <Computed<T> as Signal>::Guard

Register a watcher to be notified when the computed value changes. Read more
Source§

impl<T, RHS> Sub<RHS> for Computed<T>
where Computed<T>: Signal<Output = T>, RHS: Signal, T: Sub<<RHS as Signal>::Output> + Clone + 'static, <RHS as Signal>::Output: Clone,

Source§

type Output = Map<Zip<Computed<T>, RHS>, fn((T, <RHS as Signal>::Output)) -> <T as Sub<<RHS as Signal>::Output>>::Output, <T as Sub<<RHS as Signal>::Output>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: RHS) -> <Computed<T> as Sub<RHS>>::Output

Performs the - operation. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Computed<T>

§

impl<T> !Send for Computed<T>

§

impl<T> !Sync for Computed<T>

§

impl<T> !UnwindSafe for Computed<T>

§

impl<T> Freeze for Computed<T>
where Box<dyn ComputedImpl<Output = T>>: Freeze,

§

impl<T> Unpin for Computed<T>
where Box<dyn ComputedImpl<Output = T>>: Unpin,

§

impl<T> UnsafeUnpin for Computed<T>
where Box<dyn ComputedImpl<Output = T>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<S> AnimationExt for S
where S: SignalExt,

Source§

fn animated(&self) -> WithMetadata<Self, Animation>

Attach the system-default animation to this reactive value. Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<C, F, T1, T2, Output> FlattenMap<F, (T1, T2), Output> for C
where C: Signal<Output = (T1, T2)> + 'static, F: 'static + Clone + Fn(T1, T2) -> Output, T1: 'static, T2: 'static, Output: 'static,

Source§

fn flatten_map(&self, f: F) -> Map<C, impl Clone + Fn((T1, T2)), Output>

Maps a function over the flattened elements of a nested tuple. Read more
Source§

impl<C, F, T1, T2, T3, Output> FlattenMap<F, (T1, T2, T3), Output> for C
where C: Signal<Output = ((T1, T2), T3)> + 'static, F: 'static + Clone + Fn(T1, T2, T3) -> Output, Output: 'static,

Source§

fn flatten_map(&self, f: F) -> Map<C, impl Clone + Fn(((T1, T2), T3)), Output>

Maps a function over the flattened elements of a nested tuple. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> IdentifiableExt for T

Source§

fn use_id<F, Id>(self, f: F) -> UseId<Self, F>
where F: Fn(&Self) -> Id, Id: Ord + Hash,

Wraps the value in a UseId with the provided identification function.
Source§

fn self_id(self) -> SelfId<Self>

Wraps the value in a SelfId, making the value serve as its own identifier.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<C, Output> IntoComputed<Output> for C
where C: IntoSignal<Output> + 'static, <C as IntoSignal<Output>>::Signal: Clone + 'static,

Source§

fn into_computed(self) -> Computed<Output>

Convert this value into a Computed<Output>.

Source§

impl<C, Output> IntoSignal<Output> for C
where C: Signal, <C as Signal>::Output: 'static + Clone, Output: From<<C as Signal>::Output> + 'static,

Source§

fn into_signal(self) -> <C as IntoSignal<Output>>::Signal

Convert this computation into one that produces the desired output type.

Source§

type Signal = Map<C, fn(<C as Signal>::Output) -> Output, Output>

The specific computation type that will be produced.
Source§

impl<S> IntoSignalF32 for S
where S: Signal + 'static, <S as Signal>::Output: IntoF32,

Source§

type Signal = Map<S, fn(<S as Signal>::Output) -> f32, f32>

Concrete signal type after conversion.
Source§

fn into_signal_f32(self) -> <S as IntoSignalF32>::Signal

Converts the input into an f32 signal.
Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<C> SignalExt for C
where C: Signal,

Source§

fn map<F, Output>(&self, f: F) -> Map<Self, F, Output>
where F: 'static + Clone + Fn(Self::Output) -> Output, Output: 'static, Self: 'static,

Transforms the output of this signal using the provided function.
Source§

fn zip<B>(&self, b: &B) -> Zip<Self, B>
where B: Signal, Self::Output: Clone, <B as Signal>::Output: Clone,

Combines this signal with another signal into a tuple.
Source§

fn cached(&self) -> Cached<Self>
where Self::Output: Clone,

Wraps this signal with caching to avoid redundant computations.
Source§

fn computed(&self) -> Computed<Self::Output>
where Self: 'static,

Converts this signal into a type-erased Computed container.
Source§

fn with<T>(&self, metadata: T) -> WithMetadata<Self, T>
where T: 'static,

Attaches metadata to this signal’s watcher notifications.
Source§

fn map_into<U>(&self) -> Map<Self, fn(Self::Output) -> U, U>
where Self: 'static, Self::Output: Into<U>, U: 'static,

Transforms the output using Into::into.
Source§

fn inspect<F>( &self, f: F, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, Self::Output>
where Self: 'static, Self::Output: Clone + 'static, F: 'static + Clone + Fn(&Self::Output),

Applies a side-effect function and returns the original value.
Source§

fn distinct(&self) -> Distinct<Self>
where Self::Output: PartialEq + Clone,

Creates a distinct signal that only notifies on value changes.
Source§

fn equal_to( &self, other: Self::Output, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, bool>
where Self: 'static, Self::Output: Clone + PartialEq + 'static,

Returns true if the value equals the given value. Read more
Source§

fn condition<F>( &self, predicate: F, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, bool>
where Self: 'static, F: 'static + Clone + Fn(&Self::Output) -> bool,

Returns true if the predicate returns true for the value.
Source§

fn gt( &self, other: Self::Output, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, bool>
where Self: 'static, Self::Output: Clone + PartialOrd + 'static,

Returns true if the value is greater than the given value.
Source§

fn lt( &self, other: Self::Output, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, bool>
where Self: 'static, Self::Output: Clone + PartialOrd + 'static,

Returns true if the value is less than the given value.
Source§

fn ge( &self, other: Self::Output, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, bool>
where Self: 'static, Self::Output: Clone + PartialOrd + 'static,

Returns true if the value is greater than or equal to the given value.
Source§

fn le( &self, other: Self::Output, ) -> Map<Self, impl Clone + Fn(Self::Output) + 'static, bool>
where Self: 'static, Self::Output: Clone + PartialOrd + 'static,

Returns true if the value is less than or equal to the given value.
Source§

fn is_some<T>(&self) -> Map<Self, fn(Option<T>) -> bool, bool>
where Self: Signal<Output = Option<T>> + 'static, T: 'static,

Returns true if the Option is Some.
Source§

fn is_none<T>(&self) -> Map<Self, fn(Option<T>) -> bool, bool>
where Self: Signal<Output = Option<T>> + 'static, T: 'static,

Returns true if the Option is None.
Source§

fn unwrap_or<T>( &self, default: T, ) -> Map<Self, impl Clone + Fn(Option<T>) + 'static, T>
where Self: Signal<Output = Option<T>> + 'static, T: Clone + 'static,

Returns the contained value or a default.
Source§

fn unwrap_or_else<T, F>( &self, default: F, ) -> Map<Self, impl Clone + Fn(Option<T>) + 'static, T>
where Self: Signal<Output = Option<T>> + 'static, T: 'static, F: 'static + Clone + Fn() -> T,

Returns the contained value or computes it from a closure.
Source§

fn unwrap_or_default<T>(&self) -> Map<Self, fn(Option<T>) -> T, T>
where Self: Signal<Output = Option<T>> + 'static, T: Default + 'static,

Returns the contained value or the default value for that type.
Source§

fn some_equal_to<T>( &self, value: T, ) -> Map<Self, impl Clone + Fn(Option<T>) + 'static, bool>
where Self: Signal<Output = Option<T>> + 'static, T: Clone + PartialEq + 'static,

Returns true if the Option is Some and the value equals the given value.
Source§

fn flatten<T>(&self) -> Map<Self, fn(Option<Option<T>>) -> Option<T>, Option<T>>
where Self: Signal<Output = Option<Option<T>>> + 'static, T: 'static,

Flattens a nested Option<Option<T>> into Option<T>.
Source§

fn map_some<T, U, F>( &self, f: F, ) -> Map<Self, impl Clone + Fn(Option<T>) + 'static, Option<U>>
where Self: Signal<Output = Option<T>> + 'static, T: 'static, U: 'static, F: 'static + Clone + Fn(T) -> U,

Maps an Option<T> to Option<U> using the provided function.
Source§

fn and_then_some<T, U, F>( &self, f: F, ) -> Map<Self, impl Clone + Fn(Option<T>) + 'static, Option<U>>
where Self: Signal<Output = Option<T>> + 'static, T: 'static, U: 'static, F: 'static + Clone + Fn(T) -> Option<U>,

Returns None if the option is None, otherwise calls f with the wrapped value and returns the result.
Source§

fn not(&self) -> Map<Self, fn(bool) -> bool, bool>
where Self: Signal<Output = bool> + 'static,

Returns the logical negation of the boolean value.
Source§

fn and<B>(&self, other: &B) -> Map<Zip<Self, B>, fn((bool, bool)) -> bool, bool>
where Self: Signal<Output = bool> + 'static, B: Signal<Output = bool> + 'static,

Returns the logical AND of this signal with another boolean signal.
Source§

fn or<B>(&self, other: &B) -> Map<Zip<Self, B>, fn((bool, bool)) -> bool, bool>
where Self: Signal<Output = bool> + 'static, B: Signal<Output = bool> + 'static,

Returns the logical OR of this signal with another boolean signal.
Source§

fn then_some<T>( &self, value: T, ) -> Map<Self, impl Clone + Fn(bool) + 'static, Option<T>>
where Self: Signal<Output = bool> + 'static, T: Clone + 'static,

Returns Some(value) if true, otherwise None.
Source§

fn select<T>( &self, if_true: T, if_false: T, ) -> Map<Self, impl Clone + Fn(bool) + 'static, T>
where Self: Signal<Output = bool> + 'static, T: Clone + 'static,

Returns if_true if true, otherwise if_false.
Source§

fn negate<T>(&self) -> Map<Self, fn(T) -> T, T>
where Self: Signal<Output = T> + 'static, T: Signed + 'static,

Returns the negation of the value.
Source§

fn abs<T>(&self) -> Map<Self, fn(T) -> T, T>
where Self: Signal<Output = T> + 'static, T: Signed + 'static,

Returns the absolute value.
Source§

fn sign<T>(&self) -> Map<Self, fn(T) -> bool, bool>
where Self: Signal<Output = T> + 'static, T: Signed + 'static,

Returns true if the value is not negative (i.e., positive or zero).
Source§

fn is_positive<T>(&self) -> Map<Self, fn(T) -> bool, bool>
where Self: Signal<Output = T> + 'static, T: Signed + 'static,

Returns true if the value is positive.
Source§

fn is_negative<T>(&self) -> Map<Self, fn(T) -> bool, bool>
where Self: Signal<Output = T> + 'static, T: Signed + 'static,

Returns true if the value is negative.
Source§

fn is_zero<T>(&self) -> Map<Self, fn(T) -> bool, bool>
where Self: Signal<Output = T> + 'static, T: Zero + 'static,

Returns true if the value is zero.
Source§

fn is_ok<T, E>(&self) -> Map<Self, fn(Result<T, E>) -> bool, bool>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static,

Returns true if the Result is Ok.
Source§

fn is_err<T, E>(&self) -> Map<Self, fn(Result<T, E>) -> bool, bool>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static,

Returns true if the Result is Err.
Source§

fn ok<T, E>(&self) -> Map<Self, fn(Result<T, E>) -> Option<T>, Option<T>>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static,

Converts from Result<T, E> to Option<T>.
Source§

fn err<T, E>(&self) -> Map<Self, fn(Result<T, E>) -> Option<E>, Option<E>>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static,

Converts from Result<T, E> to Option<E>.
Source§

fn unwrap_or_result<T, E>( &self, default: T, ) -> Map<Self, impl Clone + Fn(Result<T, E>) + 'static, T>
where Self: Signal<Output = Result<T, E>> + 'static, T: Clone + 'static, E: 'static,

Returns the contained Ok value or a default.
Source§

fn unwrap_or_else_result<T, E, F>( &self, f: F, ) -> Map<Self, impl Clone + Fn(Result<T, E>) + 'static, T>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static, F: 'static + Clone + Fn(E) -> T,

Returns the contained Ok value or computes it from the error.
Source§

fn map_ok<T, E, U, F>( &self, f: F, ) -> Map<Self, impl Clone + Fn(Result<T, E>) + 'static, Result<U, E>>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static, U: 'static, F: 'static + Clone + Fn(T) -> U,

Maps a Result<T, E> to Result<U, E> using the provided function.
Source§

fn map_err<T, E, F, U>( &self, f: F, ) -> Map<Self, impl Clone + Fn(Result<T, E>) + 'static, Result<T, U>>
where Self: Signal<Output = Result<T, E>> + 'static, T: 'static, E: 'static, U: 'static, F: 'static + Clone + Fn(E) -> U,

Maps a Result<T, E> to Result<T, F> using the provided function.
Source§

fn debounce(&self, duration: Duration) -> Debounce<Self, DefaultExecutor>
where Self::Output: Clone,

Creates a debounced version of this signal. Read more
Source§

fn throttle(&self, duration: Duration) -> Throttle<Self, DefaultExecutor>
where Self::Output: Clone,

Creates a throttled version of this signal. Read more
Source§

fn str_is_empty<T>(&self) -> Map<Self, fn(T) -> bool, bool>
where Self: Signal<Output = T> + 'static, T: AsRef<str> + 'static,

Returns true if the string is empty. Read more
Source§

fn str_len<T>(&self) -> Map<Self, fn(T) -> usize, usize>
where Self: Signal<Output = T> + 'static, T: AsRef<str> + 'static,

Returns the length of the string in bytes.
Source§

fn str_contains<T>( &self, pattern: impl Into<String>, ) -> Map<Self, impl Clone + Fn(T) + 'static, bool>
where Self: Signal<Output = T> + 'static, T: AsRef<str> + 'static,

Returns true if the string contains the given pattern. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.