pub struct SheetSpec {
pub min: f32,
pub max: f32,
pub initial: f32,
pub snap: bool,
pub stops: Vec<f32>,
pub dismissible: bool,
}Expand description
What a DraggableScrollableSheet tells the frame about itself. Heights are shares
of the box the sheet fills, from 0.0 to 1.0.
Fields§
§min: f32The lowest height it rests at while it stays open.
max: f32The highest.
initial: f32Where it starts, before any finger has moved it.
snap: boolWhether a release settles on a stop, rather than coasting to wherever its momentum runs out.
stops: Vec<f32>Every height it may settle on when it snaps, in increasing order: min, the
sizes in between, max — and 0.0 below them when it can be dismissed.
dismissible: boolWhether it may be lowered past min to nothing, which closes it.
Implementations§
Trait Implementations§
impl StructuralPartialEq for SheetSpec
Auto Trait Implementations§
impl Freeze for SheetSpec
impl RefUnwindSafe for SheetSpec
impl Send for SheetSpec
impl Sync for SheetSpec
impl Unpin for SheetSpec
impl UnsafeUnpin for SheetSpec
impl UnwindSafe for SheetSpec
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