Struct moa_signals::ObservableSignal
source · pub struct ObservableSignal<T>(pub(crate) Rc<RefCell<(T, Option<Box<dyn Fn(&T)>>)>>);
Tuple Fields§
§0: Rc<RefCell<(T, Option<Box<dyn Fn(&T)>>)>>
Implementations§
source§impl<T> ObservableSignal<T>
impl<T> ObservableSignal<T>
pub fn new(init: T) -> ObservableSignal<T>
pub fn borrow_mut(&self) -> RefMut<'_, T>
Trait Implementations§
source§impl<T: Clone> Clone for ObservableSignal<T>
impl<T: Clone> Clone for ObservableSignal<T>
source§fn clone(&self) -> ObservableSignal<T>
fn clone(&self) -> ObservableSignal<T>
Returns a copy 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 moresource§impl<T> Observable<T> for ObservableSignal<T>
impl<T> Observable<T> for ObservableSignal<T>
Auto Trait Implementations§
impl<T> Freeze for ObservableSignal<T>
impl<T> !RefUnwindSafe for ObservableSignal<T>
impl<T> !Send for ObservableSignal<T>
impl<T> !Sync for ObservableSignal<T>
impl<T> Unpin for ObservableSignal<T>
impl<T> !UnwindSafe for ObservableSignal<T>
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