Struct GenSignal

Source
pub struct GenSignal<T: 'static> { /* private fields */ }
Expand description

GenSignal is !Send + !Sync

Trait Implementations§

Source§

impl<T: 'static> Clone for GenSignal<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: PartialEq> IntoEq for GenSignal<T>

Source§

impl<T: 'static> PartialEq for GenSignal<T>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> ShareValue for GenSignal<T>

Source§

type Value = T

Source§

fn try_unwrap(self) -> Result<Self::Value, Self>
where Self: Sized,

Source§

fn get(&self) -> T
where T: Copy,

Source§

fn get_cloned(&self) -> T
where T: Clone,

Source§

fn replace(&self, new_value: T) -> T

The old value is returned.
Source§

fn map<R>(&self, f: impl FnOnce(&T) -> R) -> R

Source§

fn map_mut<R>(&self, f: impl FnOnce(&mut T) -> R) -> R

Source§

fn equivalent_to(&self, other: &Self) -> bool

Returns true if self and other are sharing values from the same allocation. In that case, self and other are equivalent to each other because calling the same method on either of them leads to the same result.
Source§

fn unwrap_or_get_cloned(self) -> Self::Value
where Self: Sized, Self::Value: Clone,

Source§

fn set(&self, new_value: Self::Value)

Source§

fn replace_mut<F: FnOnce(&mut Self::Value) -> Self::Value>( &self, f: F, ) -> Self::Value

The old value is returned.
Source§

fn replace_with<F: FnOnce(&Self::Value) -> Self::Value>( &self, f: F, ) -> Self::Value

The old value is returned.
Source§

impl<T> Signal for GenSignal<T>

Source§

type SignalHook = GenSignalHook<T>

Source§

fn is_signal_of(&self, signal_hook: &Self::SignalHook) -> bool

Source§

fn to_signal_hook(&self) -> Self::SignalHook

This is the opposite of SignalHook::to_signal.
Source§

fn update_signal_hook(&self, hook: Pin<&mut Self::SignalHook>)

Source§

fn h_signal_hook<'hook>( &self, hook: Pin<&'hook mut <Self::SignalHook as SignalHook>::SignalHookUninitialized>, ) -> Value<'hook, Self::SignalHook>

Source§

fn notify_changed(&self)

Source§

fn map_mut_and_notify_if<R>( &self, f: impl FnOnce(&mut Self::Value) -> (R, bool), ) -> R

Source§

fn use_signal(&self) -> UseSignal<'_, Self>

Source§

impl<T> ToOwnedShareValue for GenSignal<T>

Source§

impl<T: 'static> Copy for GenSignal<T>

Source§

impl<T: 'static> Eq for GenSignal<T>

Auto Trait Implementations§

§

impl<T> Freeze for GenSignal<T>

§

impl<T> !RefUnwindSafe for GenSignal<T>

§

impl<T> !Send for GenSignal<T>

§

impl<T> !Sync for GenSignal<T>

§

impl<T> Unpin for GenSignal<T>

§

impl<T> !UnwindSafe for GenSignal<T>

Blanket Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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 = Infallible

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.
Source§

impl<T, U> Captures<U> for T
where T: ?Sized,