Type Alias freya_hooks::ReadAnimatedValue
source · pub type ReadAnimatedValue = ReadOnlySignal<Box<dyn AnimatedValue>>;
Aliased Type§
struct ReadAnimatedValue { /* private fields */ }
Implementations
§impl<T> ReadOnlySignal<T>where
T: 'static,
impl<T> ReadOnlySignal<T>where
T: 'static,
pub fn new(signal: Signal<T>) -> ReadOnlySignal<T>
pub fn new(signal: Signal<T>) -> ReadOnlySignal<T>
Create a new read-only signal.
§impl<T, S> ReadOnlySignal<T, S>where
T: 'static,
S: Storage<SignalData<T>>,
impl<T, S> ReadOnlySignal<T, S>where
T: 'static,
S: Storage<SignalData<T>>,
pub fn new_maybe_sync(signal: Signal<T, S>) -> ReadOnlySignal<T, S>
pub fn new_maybe_sync(signal: Signal<T, S>) -> ReadOnlySignal<T, S>
Create a new read-only signal that is maybe sync.
pub fn origin_scope(&self) -> ScopeId
pub fn origin_scope(&self) -> ScopeId
Get the scope that the signal was created in.
pub fn id(&self) -> GenerationalBoxId
pub fn id(&self) -> GenerationalBoxId
Get the id of the signal.
Trait Implementations
§impl<T> IntoAttributeValue for ReadOnlySignal<T>where
T: Clone + IntoAttributeValue,
impl<T> IntoAttributeValue for ReadOnlySignal<T>where
T: Clone + IntoAttributeValue,
§fn into_value(self) -> AttributeValue
fn into_value(self) -> AttributeValue
Convert into an attribute value
§impl<T> IntoDynNode for ReadOnlySignal<T>where
T: Clone + IntoDynNode,
impl<T> IntoDynNode for ReadOnlySignal<T>where
T: Clone + IntoDynNode,
§fn into_dyn_node(self) -> DynamicNode
fn into_dyn_node(self) -> DynamicNode
Consume this item along with a scopestate and produce a DynamicNode Read more
§impl<T, S> PartialEq<T> for ReadOnlySignal<T, S>where
T: PartialEq + 'static,
S: Storage<SignalData<T>>,
impl<T, S> PartialEq<T> for ReadOnlySignal<T, S>where
T: PartialEq + 'static,
S: Storage<SignalData<T>>,
§impl<T, S> PartialEq for ReadOnlySignal<T, S>where
T: 'static,
S: Storage<SignalData<T>>,
impl<T, S> PartialEq for ReadOnlySignal<T, S>where
T: 'static,
S: Storage<SignalData<T>>,
§impl<T, S> Readable for ReadOnlySignal<T, S>where
S: Storage<SignalData<T>>,
impl<T, S> Readable for ReadOnlySignal<T, S>where
S: Storage<SignalData<T>>,
§fn peek_unchecked(&self) -> <S as AnyStorage>::Ref<'static, T>
fn peek_unchecked(&self) -> <S as AnyStorage>::Ref<'static, T>
Get the current value of the signal. Unlike read, this will not subscribe the current scope to the signal which can cause parts of your UI to not update.
If the signal has been dropped, this will panic.
§fn try_read_unchecked(
&self,
) -> Result<<<ReadOnlySignal<T, S> as Readable>::Storage as AnyStorage>::Ref<'static, <ReadOnlySignal<T, S> as Readable>::Target>, BorrowError>
fn try_read_unchecked( &self, ) -> Result<<<ReadOnlySignal<T, S> as Readable>::Storage as AnyStorage>::Ref<'static, <ReadOnlySignal<T, S> as Readable>::Target>, BorrowError>
Try to get a reference to the value without checking the lifetime. This will subscribe the current scope to the signal. Read more
§fn map<O>(
self,
f: impl Fn(&Self::Target) -> &O + 'static,
) -> MappedSignal<O, Self::Storage>
fn map<O>( self, f: impl Fn(&Self::Target) -> &O + 'static, ) -> MappedSignal<O, Self::Storage>
Map the readable type to a new type.
§fn read(&self) -> <Self::Storage as AnyStorage>::Ref<'_, Self::Target>
fn read(&self) -> <Self::Storage as AnyStorage>::Ref<'_, Self::Target>
Get the current value of the state. If this is a signal, this will subscribe the current scope to the signal.
If the value has been dropped, this will panic. Calling this on a Signal is the same as
using the signal() syntax to read and subscribe to its value
§fn try_read(
&self,
) -> Result<<Self::Storage as AnyStorage>::Ref<'_, Self::Target>, BorrowError>
fn try_read( &self, ) -> Result<<Self::Storage as AnyStorage>::Ref<'_, Self::Target>, BorrowError>
Try to get the current value of the state. If this is a signal, this will subscribe the current scope to the signal.
§fn read_unchecked(
&self,
) -> <Self::Storage as AnyStorage>::Ref<'static, Self::Target>
fn read_unchecked( &self, ) -> <Self::Storage as AnyStorage>::Ref<'static, Self::Target>
Get a reference to the value without checking the lifetime. This will subscribe the current scope to the signal. Read more
§fn peek(&self) -> <Self::Storage as AnyStorage>::Ref<'_, Self::Target>
fn peek(&self) -> <Self::Storage as AnyStorage>::Ref<'_, Self::Target>
Get the current value of the state without subscribing to updates. If the value has been dropped, this will panic.
§fn with<O>(&self, f: impl FnOnce(&Self::Target) -> O) -> O
fn with<O>(&self, f: impl FnOnce(&Self::Target) -> O) -> O
Run a function with a reference to the value. If the value has been dropped, this will panic.