pub struct SignalSurrogate<T>(/* private fields */);Implementations§
Source§impl<T> SignalSurrogate<T>where
for<'b> &'b T: Surrogated,
impl<T> SignalSurrogate<T>where
for<'b> &'b T: Surrogated,
Sourcepub fn read(&self) -> <&T as Surrogated>::Surrogate
pub fn read(&self) -> <&T as Surrogated>::Surrogate
Borrows the current value.
Reads inside a runtime expression are the client-reactive path and do not register a dependency on the server; the server-side evaluation only records whether the expression needs a browser binding.
Source§impl<T> SignalSurrogate<T>where
T: Surrogated + Clone,
impl<T> SignalSurrogate<T>where
T: Surrogated + Clone,
Sourcepub fn get(&self) -> <T as Surrogated>::Surrogate
pub fn get(&self) -> <T as Surrogated>::Surrogate
Clones the current value.
Like read, this does not register a dependency on
the server.
Source§impl<T> SignalSurrogate<T>where
T: Surrogated,
impl<T> SignalSurrogate<T>where
T: Surrogated,
Source§impl SignalSurrogate<bool>
impl SignalSurrogate<bool>
Source§impl SignalSurrogate<f64>
impl SignalSurrogate<f64>
Source§impl SignalSurrogate<u8>
impl SignalSurrogate<u8>
Source§impl SignalSurrogate<u16>
impl SignalSurrogate<u16>
Source§impl SignalSurrogate<u32>
impl SignalSurrogate<u32>
Source§impl SignalSurrogate<u64>
impl SignalSurrogate<u64>
Source§impl SignalSurrogate<u128>
impl SignalSurrogate<u128>
Source§impl SignalSurrogate<usize>
impl SignalSurrogate<usize>
Source§impl SignalSurrogate<i8>
impl SignalSurrogate<i8>
Source§impl SignalSurrogate<i16>
impl SignalSurrogate<i16>
Source§impl SignalSurrogate<i32>
impl SignalSurrogate<i32>
Source§impl SignalSurrogate<i64>
impl SignalSurrogate<i64>
Source§impl SignalSurrogate<i128>
impl SignalSurrogate<i128>
Source§impl SignalSurrogate<isize>
impl SignalSurrogate<isize>
Source§impl SignalSurrogate<String>
impl SignalSurrogate<String>
Sourcepub fn push_str(&self, _s: impl Deref<Target = StrSurrogate>)
pub fn push_str(&self, _s: impl Deref<Target = StrSurrogate>)
Appends a string to the end of the value.
Accepts borrowed or owned strings, including an event target’s value.
§Panics
Always panics; signal writes can only occur in client-side expressions.
Trait Implementations§
Source§impl<T: Debug> Debug for SignalSurrogate<T>
impl<T: Debug> Debug for SignalSurrogate<T>
Source§impl<'de, T> Deserialize<'de> for SignalSurrogate<T>
A signal sent by the client, as an argument to a run: its id next to its
current value.
impl<'de, T> Deserialize<'de> for SignalSurrogate<T>
A signal sent by the client, as an argument to a run: its id next to its current value.
The value is required. A run cannot read a signal it has no value for, so a client that sends only the id is rejected the same way as one that sends a value of the wrong shape.