pub struct Clipper<'a> { /* private fields */ }Expand description
Configure the Clipper.
Implementations§
Source§impl<'a> Clipper<'a>
impl<'a> Clipper<'a>
Sourcepub fn layout(self, page_layout: ClipperLayout) -> Self
pub fn layout(self, page_layout: ClipperLayout) -> Self
Page layout.
Sourcepub fn struct_layout(self, page_layout: StructuredLayout) -> Self
pub fn struct_layout(self, page_layout: StructuredLayout) -> Self
Set page layout from StructLayout
Sourcepub fn styles(self, styles: ClipperStyle) -> Self
pub fn styles(self, styles: ClipperStyle) -> Self
Combined style.
Sourcepub fn layout_width(&self, area: Rect, state: &ClipperState) -> u16
pub fn layout_width(&self, area: Rect, state: &ClipperState) -> u16
Calculate the layout width.
Sourcepub fn inner(&self, area: Rect, state: &ClipperState) -> Rect
pub fn inner(&self, area: Rect, state: &ClipperState) -> Rect
Calculate the view area.
Sourcepub fn into_buffer(
self,
area: Rect,
state: &mut ClipperState,
) -> ClipperBuffer<'a>
pub fn into_buffer( self, area: Rect, state: &mut ClipperState, ) -> ClipperBuffer<'a>
Calculates the layout and creates a temporary buffer.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Clipper<'a>
impl<'a> !RefUnwindSafe for Clipper<'a>
impl<'a> !Send for Clipper<'a>
impl<'a> !Sync for Clipper<'a>
impl<'a> Unpin for Clipper<'a>
impl<'a> !UnwindSafe for Clipper<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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