pub struct ModalState<'a> {
pub scrollbar_state: ScrollbarState,
pub scrollbar_position: usize,
pub viewport_height: usize,
pub text: &'a str,
pub title: ModalTitle<'a>,
pub is_open: bool,
}Fields§
§scrollbar_state: ScrollbarState§scrollbar_position: usize§viewport_height: usize§text: &'a str§title: ModalTitle<'a>§is_open: boolImplementations§
Source§impl<'a> ModalState<'a>
impl<'a> ModalState<'a>
pub fn new(title: ModalTitle<'a>, text: &'a str) -> Self
pub fn scroll_up(self, amount: usize) -> Self
pub fn scroll_down(self, amount: usize) -> Self
pub fn reset_scrollbar(self) -> Self
Trait Implementations§
Source§impl<'a> Clone for ModalState<'a>
impl<'a> Clone for ModalState<'a>
Source§fn clone(&self) -> ModalState<'a>
fn clone(&self) -> ModalState<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ModalState<'a>
impl<'a> Debug for ModalState<'a>
Source§impl<'a> Default for ModalState<'a>
impl<'a> Default for ModalState<'a>
Source§fn default() -> ModalState<'a>
fn default() -> ModalState<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for ModalState<'a>
impl<'a> PartialEq for ModalState<'a>
impl<'a> StructuralPartialEq for ModalState<'a>
Auto Trait Implementations§
impl<'a> Freeze for ModalState<'a>
impl<'a> RefUnwindSafe for ModalState<'a>
impl<'a> Send for ModalState<'a>
impl<'a> Sync for ModalState<'a>
impl<'a> Unpin for ModalState<'a>
impl<'a> UnsafeUnpin for ModalState<'a>
impl<'a> UnwindSafe for ModalState<'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§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