pub struct Sig<T>(pub T);Expand description
Newtype wrapper to mark this type as a signal.
For use with SignalOrValue and RefSignalOrValue
Tuple Fields§
§0: TTrait Implementations§
Source§impl<T, S> RefSignalOrValue<'static> for Sig<S>where
T: 'static,
S: Signal<Item = T> + 'static,
impl<T, S> RefSignalOrValue<'static> for Sig<S>where
T: 'static,
S: Signal<Item = T> + 'static,
Source§type Map<'b, F, R> = Sig<Map<S, F>>
where
F: FnMut(Self::Item) -> R + 'b,
R: RefSignalOrValue<'b, Item = R> + 'b,
'b: 'static
type Map<'b, F, R> = Sig<Map<S, F>> where F: FnMut(Self::Item) -> R + 'b, R: RefSignalOrValue<'b, Item = R> + 'b, 'b: 'static
Source§fn map<'b, F, R>(self, callback: F) -> Self::Map<'b, F, R>
fn map<'b, F, R>(self, callback: F) -> Self::Map<'b, F, R>
Map a function over this signal/value to produce a new signal/value.
Source§fn select<FVal, FSig, Data, Out>(
self,
_fn_val: FVal,
fn_sig: FSig,
data: Data,
) -> Out
fn select<FVal, FSig, Data, Out>( self, _fn_val: FVal, fn_sig: FSig, data: Data, ) -> Out
Select a function based on whether this is a signal or value. Read more
Source§fn select_spawn<FVal, FSig, Task, Exec>(
self,
_fn_val: FVal,
fn_sig: FSig,
executor: &mut Exec,
)
fn select_spawn<FVal, FSig, Task, Exec>( self, _fn_val: FVal, fn_sig: FSig, executor: &mut Exec, )
Select a function based on whether this is a signal or value. Read more
Auto Trait Implementations§
impl<T> Freeze for Sig<T>where
T: Freeze,
impl<T> RefUnwindSafe for Sig<T>where
T: RefUnwindSafe,
impl<T> Send for Sig<T>where
T: Send,
impl<T> Sync for Sig<T>where
T: Sync,
impl<T> Unpin for Sig<T>where
T: Unpin,
impl<T> UnwindSafe for Sig<T>where
T: UnwindSafe,
Blanket Implementations§
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