pub struct PreviewUI {
pub view: Preview,
pub layout_idx: usize,
pub area: Rect,
pub offset: u16,
/* private fields */
}Fields§
§view: Preview§layout_idx: usize§area: Rectcontent area
offset: u16Implementations§
Source§impl PreviewUI
impl PreviewUI
pub fn new(view: Preview, config: PreviewConfig) -> Self
pub fn update_dimensions(&mut self, area: &Rect)
pub fn layout(&self) -> Option<&PreviewLayoutSetting>
pub fn command(&self) -> &str
pub fn cycle_layout(&mut self)
pub fn set_idx(&mut self, idx: u8) -> bool
pub fn is_show(&self) -> bool
pub fn show<const SHOW: bool>(&mut self) -> bool
pub fn toggle_show(&mut self)
pub fn wrap(&mut self, wrap: bool)
pub fn is_wrap(&self) -> bool
pub fn up(&mut self, n: u16)
pub fn down(&mut self, n: u16)
pub fn make_preview(&self) -> Paragraph<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreviewUI
impl RefUnwindSafe for PreviewUI
impl Send for PreviewUI
impl Sync for PreviewUI
impl Unpin for PreviewUI
impl UnwindSafe for PreviewUI
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> 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 moreSource§impl<T> MaybeExt for T
impl<T> MaybeExt for T
Source§fn maybe_take(&mut self, maybe: Option<T>)
fn maybe_take(&mut self, maybe: Option<T>)
Merge from maybe by taking.
Source§fn maybe_clone(&mut self, maybe: &Option<T>)where
T: Clone,
fn maybe_clone(&mut self, maybe: &Option<T>)where
T: Clone,
Merge from maybe by cloning.