pub struct Panel<M> { /* private fields */ }Expand description
The contents of a popover. The host draws the surface, its background and its edges, and lays
every popover out at the same width, or at a wider one if it asks (Panel::wide).
Implementations§
Source§impl<M> Panel<M>
impl<M> Panel<M>
pub fn new(content: Node<M>) -> Self
Sourcepub fn wide(self) -> Self
pub fn wide(self) -> Self
Laid out wider than other popovers, for a page that’s mostly reading: a conversation, a document. The host decides how wide.
Sourcepub fn on_open(self, message: M) -> Self
pub fn on_open(self, message: M) -> Self
Sent each time the popover opens: start a scan, show the first page.
Sourcepub fn on_close(self, message: M) -> Self
pub fn on_close(self, message: M) -> Self
Sent each time the popover starts closing: stop listening, forget what was typed.
pub fn map<N: 'static>(
self,
f: &(impl Fn(M) -> N + Clone + 'static),
) -> Panel<N>where
M: 'static,
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Panel<M>
impl<M> !Send for Panel<M>
impl<M> !Sync for Panel<M>
impl<M> !UnwindSafe for Panel<M>
impl<M> Freeze for Panel<M>
impl<M> Unpin for Panel<M>
impl<M> UnsafeUnpin for Panel<M>
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