Struct ReadSignal
pub struct ReadSignal<T> { /* private fields */ }Expand description
A getter only Signal
Implementations§
§impl<T> ReadSignal<T>
impl<T> ReadSignal<T>
pub fn id(&self) -> Id
Trait Implementations§
§impl<T> Add<T> for ReadSignal<T>
impl<T> Add<T> for ReadSignal<T>
§impl<T> BitAnd<T> for ReadSignal<T>
impl<T> BitAnd<T> for ReadSignal<T>
§impl<T> BitOr<T> for ReadSignal<T>
impl<T> BitOr<T> for ReadSignal<T>
§impl<T> BitXor<T> for ReadSignal<T>
impl<T> BitXor<T> for ReadSignal<T>
§impl<T> Clone for ReadSignal<T>
impl<T> Clone for ReadSignal<T>
§fn clone(&self) -> ReadSignal<T>
fn clone(&self) -> ReadSignal<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<T> Default for ReadSignal<T>where
T: Default + 'static,
impl<T> Default for ReadSignal<T>where
T: Default + 'static,
§fn default() -> ReadSignal<T>
fn default() -> ReadSignal<T>
Returns the “default value” for a type. Read more
§impl<T> Display for ReadSignal<T>where
T: Display + 'static,
impl<T> Display for ReadSignal<T>where
T: Display + 'static,
§impl<T> Div<T> for ReadSignal<T>
impl<T> Div<T> for ReadSignal<T>
§impl<T> Mul<T> for ReadSignal<T>
impl<T> Mul<T> for ReadSignal<T>
§impl<T> Neg for ReadSignal<T>
impl<T> Neg for ReadSignal<T>
§impl<T> Not for ReadSignal<T>
impl<T> Not for ReadSignal<T>
§impl<T> PartialEq<T> for ReadSignal<T>where
T: PartialEq + 'static,
impl<T> PartialEq<T> for ReadSignal<T>where
T: PartialEq + 'static,
§impl<T> PartialEq for ReadSignal<T>
impl<T> PartialEq for ReadSignal<T>
§impl<T> Rem<T> for ReadSignal<T>
impl<T> Rem<T> for ReadSignal<T>
Source§impl<T> Res<T> for ReadSignal<T>where
T: Clone + 'static,
impl<T> Res<T> for ReadSignal<T>where
T: Clone + 'static,
Source§fn get_value(&self, _: &impl DataContext) -> T
fn get_value(&self, _: &impl DataContext) -> T
Returns the value of a resource by value.
fn set_or_bind<F>(self, cx: &mut Context, closure: F)
§impl<T> Shl<T> for ReadSignal<T>
impl<T> Shl<T> for ReadSignal<T>
§impl<T> Shr<T> for ReadSignal<T>
impl<T> Shr<T> for ReadSignal<T>
§impl<T> SignalGet<T> for ReadSignal<T>where
T: Clone,
impl<T> SignalGet<T> for ReadSignal<T>where
T: Clone,
§impl<T> SignalRead<T> for ReadSignal<T>
impl<T> SignalRead<T> for ReadSignal<T>
§fn try_read(&self) -> Option<ReadRef<'_, T>>where
T: 'static,
fn try_read(&self) -> Option<ReadRef<'_, T>>where
T: 'static,
If the signal isn’t disposed,
reads the data stored in the Signal and subscribes to the current running effect.
§fn try_read_untracked(&self) -> Option<ReadRef<'_, T>>where
T: 'static,
fn try_read_untracked(&self) -> Option<ReadRef<'_, T>>where
T: 'static,
If the signal isn’t disposed,
reads the data stored in the Signal without subscribing.
§fn read(&self) -> ReadRef<'_, T>where
T: 'static,
fn read(&self) -> ReadRef<'_, T>where
T: 'static,
Reads the data stored in the Signal, subscribing the current running effect.
§fn read_untracked(&self) -> ReadRef<'_, T>where
T: 'static,
fn read_untracked(&self) -> ReadRef<'_, T>where
T: 'static,
Reads the data stored in the Signal without subscribing.
§impl<T> SignalTrack<T> for ReadSignal<T>
impl<T> SignalTrack<T> for ReadSignal<T>
§impl<T> SignalWith<T> for ReadSignal<T>
impl<T> SignalWith<T> for ReadSignal<T>
fn with<O>(&self, f: impl FnOnce(&T) -> O) -> Owhere
T: 'static,
fn with_untracked<O>(&self, f: impl FnOnce(&T) -> O) -> Owhere
T: 'static,
fn try_with<O>(&self, f: impl FnOnce(Option<&T>) -> O) -> Owhere
T: 'static,
fn try_with_untracked<O>(&self, f: impl FnOnce(Option<&T>) -> O) -> Owhere
T: 'static,
§impl<T> Sub<T> for ReadSignal<T>
impl<T> Sub<T> for ReadSignal<T>
impl<T> Copy for ReadSignal<T>
impl<T> Eq for ReadSignal<T>
Auto Trait Implementations§
impl<T> Freeze for ReadSignal<T>
impl<T> RefUnwindSafe for ReadSignal<T>where
T: RefUnwindSafe,
impl<T> Send for ReadSignal<T>where
T: Send,
impl<T> Sync for ReadSignal<T>where
T: Sync,
impl<T> Unpin for ReadSignal<T>where
T: Unpin,
impl<T> UnwindSafe for ReadSignal<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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,
§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>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<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>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§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
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
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T, S> SignalMap<T> for Swhere
T: 'static,
S: SignalWith<T> + Copy + 'static,
impl<T, S> SignalMap<T> for Swhere
T: 'static,
S: SignalWith<T> + Copy + 'static,
§impl<T> ToSmolStr for T
impl<T> ToSmolStr for T
fn to_smolstr(&self) -> SmolStr
Source§impl<T> ToStringLocalized for Twhere
T: ToString,
impl<T> ToStringLocalized for Twhere
T: ToString,
Source§fn to_string_local(&self, _cx: &impl DataContext) -> String
fn to_string_local(&self, _cx: &impl DataContext) -> String
Method for converting the current type to a
String via a translation using fluent.