pub struct Text(/* private fields */);Available on crate feature
text only.Implementations§
Source§impl Text
impl Text
Sourcepub fn from_styled_graphemes(lines: Vec<StyledGraphemes>) -> Self
pub fn from_styled_graphemes(lines: Vec<StyledGraphemes>) -> Self
Creates a new Text from styled graphemes without parsing a string.
Useful when the caller already has styled content prepared.
Sourcepub fn replace_contents(&mut self, text: Vec<StyledGraphemes>)
pub fn replace_contents(&mut self, text: Vec<StyledGraphemes>)
Replaces the contents with new contents and adjusts the position if necessary.
Sourcepub fn items(&self) -> &Vec<StyledGraphemes>
pub fn items(&self) -> &Vec<StyledGraphemes>
Returns a reference to the vector of items in the listbox.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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