pub struct Layer<'a, M> { /* private fields */ }Expand description
A component shown over a Layers host’s base: a modal dialog or a
popover. It closes when it answers (its flow still goes up, so a mapped
Flow::Done finishes the host), when it cancels or Escape reaches the
host unused (it is dismissed, the host carries on), or through a
LayerHandle.
Implementations§
Source§impl<'a, M> Layer<'a, M>
impl<'a, M> Layer<'a, M>
Sourcepub fn modal(child: impl Component<Output = M> + 'a) -> Layer<'a, M>
pub fn modal(child: impl Component<Output = M> + 'a) -> Layer<'a, M>
A modal layer: see LayerKind::Modal.
Sourcepub fn popover(child: impl Component<Output = M> + 'a) -> Layer<'a, M>
pub fn popover(child: impl Component<Output = M> + 'a) -> Layer<'a, M>
A popover: see LayerKind::Popover.
Sourcepub fn size(self, width: usize, height: usize) -> Self
pub fn size(self, width: usize, height: usize) -> Self
Centred, width × height cells with the border (default 40 × 10).
pub fn placement(self, placement: Placement) -> Self
Sourcepub fn dismissable(self, on: bool) -> Self
pub fn dismissable(self, on: bool) -> Self
Whether Escape, reaching the host unused, closes it (default: yes).
pub fn kind(&self) -> LayerKind
Auto Trait Implementations§
impl<'a, M> !RefUnwindSafe for Layer<'a, M>
impl<'a, M> !Send for Layer<'a, M>
impl<'a, M> !Sync for Layer<'a, M>
impl<'a, M> !UnwindSafe for Layer<'a, M>
impl<'a, M> Freeze for Layer<'a, M>
impl<'a, M> Unpin for Layer<'a, M>
impl<'a, M> UnsafeUnpin for Layer<'a, 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