pub struct TextareaStates {
pub list_index: usize,
pub list_len: usize,
}
Fields§
§list_index: usize
§list_len: usize
Implementations§
Source§impl TextareaStates
impl TextareaStates
Sourcepub fn set_list_len(&mut self, len: usize)
pub fn set_list_len(&mut self, len: usize)
§set_list_len
Set list length and fix list index
Sourcepub fn incr_list_index(&mut self)
pub fn incr_list_index(&mut self)
§incr_list_index
Incremenet list index
Sourcepub fn decr_list_index(&mut self)
pub fn decr_list_index(&mut self)
§decr_list_index
Decrement list index
Sourcepub fn fix_list_index(&mut self)
pub fn fix_list_index(&mut self)
§fix_list_index
Keep index if possible, otherwise set to lenght - 1
Sourcepub fn list_index_at_first(&mut self)
pub fn list_index_at_first(&mut self)
§list_index_at_first
Set list index to the first item in the list
Sourcepub fn list_index_at_last(&mut self)
pub fn list_index_at_last(&mut self)
§list_index_at_last
Set list index at the last item of the list
Trait Implementations§
Source§impl Default for TextareaStates
impl Default for TextareaStates
Source§fn default() -> TextareaStates
fn default() -> TextareaStates
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextareaStates
impl RefUnwindSafe for TextareaStates
impl Send for TextareaStates
impl Sync for TextareaStates
impl Unpin for TextareaStates
impl UnwindSafe for TextareaStates
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 more