pub struct MenuCallbacks {
pub on_open: RefCell<Option<OnOpen>>,
pub on_close: RefCell<Option<Rc<dyn Fn()>>>,
pub on_close_async: RefCell<Option<OnCloseAsync>>,
pub on_change: RefCell<Option<Rc<dyn Fn()>>>,
}Expand description
A menu’s onOpen, onClose, and what the view hears of its changes.
Fields§
§on_open: RefCell<Option<OnOpen>>onOpen(resolution).
on_close: RefCell<Option<Rc<dyn Fn()>>>onClose().
on_close_async: RefCell<Option<OnCloseAsync>>An onClose that returns a promise (LexicalTypeaheadMenuPlugin’s
onClose?: () => void | PromiseLike<void>), called after
on_close with what settles it: the menu stays
drawn, with its keys, until the app finishes the MenuCloseDone
(or drops it, as a promise that rejects), then clears unless a newer
query opened the menu meanwhile.
on_change: RefCell<Option<Rc<dyn Fn()>>>Called when the resolution, the options or the highlighted index change, for the view to draw the menu again.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MenuCallbacks
impl !RefUnwindSafe for MenuCallbacks
impl !Send for MenuCallbacks
impl !Sync for MenuCallbacks
impl !UnwindSafe for MenuCallbacks
impl Forget for MenuCallbacks
impl Move for MenuCallbacks
impl Unpin for MenuCallbacks
impl UnsafeUnpin for MenuCallbacks
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