pub struct Sheet<Node, Message> {
pub content: Node,
pub edge: SheetEdge,
pub size: SheetSize,
/* private fields */
}Expand description
A panel that slides in from one of the window edges.
Like Dialog, a sheet is content only. The dim backdrop and its
outside-click-to-close behavior are owned by the parent crate::AppLayout.
§Builder usage
use snora_core::{Sheet, SheetEdge, SheetSize};
// Use `()` for the content/message parameters when illustrating the
// shape only. In application code these are `iced::Element<'_, M>` and
// your `Message` type.
let sheet: Sheet<(), ()> = Sheet::new(())
.at(SheetEdge::Start)
.with_size(SheetSize::Half);
assert_eq!(sheet.edge, SheetEdge::Start);
assert_eq!(sheet.size, SheetSize::Half);Fields§
§content: NodeThe sheet’s body content. The engine wraps this in a styled surface
sized according to size and anchored to edge.
edge: SheetEdgeWhere the sheet attaches. Defaults to SheetEdge::Bottom.
size: SheetSizeSize of the sheet along the axis perpendicular to edge.
Defaults to SheetSize::DEFAULT.
Implementations§
Source§impl<Node, Message> Sheet<Node, Message>
impl<Node, Message> Sheet<Node, Message>
Sourcepub fn new(content: Node) -> Self
pub fn new(content: Node) -> Self
Build a sheet with default edge (SheetEdge::Bottom) and size
(SheetSize::DEFAULT).
Auto Trait Implementations§
impl<Node, Message> Freeze for Sheet<Node, Message>
impl<Node, Message> RefUnwindSafe for Sheet<Node, Message>
impl<Node, Message> Send for Sheet<Node, Message>
impl<Node, Message> Sync for Sheet<Node, Message>
impl<Node, Message> Unpin for Sheet<Node, Message>
impl<Node, Message> UnsafeUnpin for Sheet<Node, Message>
impl<Node, Message> UnwindSafe for Sheet<Node, Message>
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