pub struct StickyConstraints {
pub top_inset: f32,
pub right_inset: f32,
pub bottom_inset: f32,
pub left_inset: f32,
pub normal_flow_position: LogicalPosition,
pub border_box_size: LogicalSize,
pub scrollport: LogicalRect,
}Expand description
Sticky positioning constraints computed at layout time. At scroll time, the sticky box’s position is clamped so that it remains within the sticky view rectangle (scrollport inset by these values).
Fields§
§top_inset: f32Inset from the top edge of the nearest scrollport (0 if auto).
right_inset: f32Inset from the right edge of the nearest scrollport (0 if auto).
bottom_inset: f32Inset from the bottom edge of the nearest scrollport (0 if auto).
left_inset: f32Inset from the left edge of the nearest scrollport (0 if auto).
normal_flow_position: LogicalPositionNormal-flow position of the sticky element (border-box origin).
border_box_size: LogicalSizeBorder-box size of the sticky element.
scrollport: LogicalRectThe scrollport rect (content-box of nearest scroll container).
Trait Implementations§
Source§impl Clone for StickyConstraints
impl Clone for StickyConstraints
Source§fn clone(&self) -> StickyConstraints
fn clone(&self) -> StickyConstraints
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StickyConstraints
impl RefUnwindSafe for StickyConstraints
impl Send for StickyConstraints
impl Sync for StickyConstraints
impl Unpin for StickyConstraints
impl UnsafeUnpin for StickyConstraints
impl UnwindSafe for StickyConstraints
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more