pub struct Overscroll { /* private fields */ }Implementations§
Source§impl Overscroll
impl Overscroll
Sourcepub fn add_plan(
&mut self,
index: u32,
plan: &FramePlan,
moving: impl Fn(&str) -> bool,
)
pub fn add_plan( &mut self, index: u32, plan: &FramePlan, moving: impl Fn(&str) -> bool, )
Keeps a stored plan’s placements of moving regions (moving says which layers are).
Sourcepub fn prepare<E>(
&mut self,
resolve: impl FnMut(&PlanPlacement, u32) -> Result<Option<(String, f64, f64)>, E>,
extent: impl Fn(&str) -> Option<(i64, i64)>,
) -> Result<(), E>
pub fn prepare<E>( &mut self, resolve: impl FnMut(&PlanPlacement, u32) -> Result<Option<(String, f64, f64)>, E>, extent: impl Fn(&str) -> Option<(i64, i64)>, ) -> Result<(), E>
Works the edges out on first use. resolve gives a placement’s final canvas and pose (None when it cannot
be placed), extent its layer’s region size.
Sourcepub fn measure(
&mut self,
layer: &str,
at: Resolved<'_>,
lines: &Lines<'_>,
) -> [i64; 4]
pub fn measure( &mut self, layer: &str, at: Resolved<'_>, lines: &Lines<'_>, ) -> [i64; 4]
The lines of each side (SIDES order) a placement leaves out: on a side whose pose runs past the page’s
edge, the background lines counted from the region’s outer side, at most as many as the pose runs past it,
and only when they reach to within [SLACK] lines of the edge. A strip with something else in it further
out is left whole: leaving out only its outer part made test_8’s bounce frames paint the input bar pinned in
the moving layer at shifted places, and the page end came out torn.
lines holds the frame; its region is the placement’s region.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Overscroll
impl RefUnwindSafe for Overscroll
impl Send for Overscroll
impl Sync for Overscroll
impl Unpin for Overscroll
impl UnsafeUnpin for Overscroll
impl UnwindSafe for Overscroll
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
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> ⓘ
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> ⓘ
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