pub struct TreeModelSubscription { /* private fields */ }Expand description
RAII subscription guard returned by TreeModelHandle::subscribe.
Dropping the guard removes its callback slot when the registry still exists.
§Examples
use std::rc::Rc;
use ailloli_ui_widgets::controls::{TreeModel, TreeModelHandle};
let handle = TreeModelHandle::new(TreeModel::<u8>::new());
let callback: Rc<dyn Fn(u64)> = Rc::new(|_| {});
let guard = handle.subscribe(&callback);
drop(guard);Trait Implementations§
Source§impl Debug for TreeModelSubscription
impl Debug for TreeModelSubscription
Auto Trait Implementations§
impl Freeze for TreeModelSubscription
impl !RefUnwindSafe for TreeModelSubscription
impl !Send for TreeModelSubscription
impl !Sync for TreeModelSubscription
impl Unpin for TreeModelSubscription
impl !UnwindSafe for TreeModelSubscription
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