pub struct MessageManager<'a> {
pub messages: Vec<Message>,
pub scroll_state: ScrollState,
/* private fields */
}Fields§
§messages: Vec<Message>§scroll_state: ScrollStateImplementations§
Source§impl<'a> MessageManager<'a>
impl<'a> MessageManager<'a>
pub fn new(config: &'a Config) -> Self
pub fn clear_messages(&mut self)
pub fn get_content_height(&self) -> usize
pub fn get_messages(&self) -> Vec<(&String, usize)>
pub fn add_message(&mut self, content: String)
pub fn handle_scroll(&mut self, action: KeyAction, window_height: usize)
pub fn get_visible_messages(&self) -> Vec<(&String, usize)>
pub fn update_typewriter(&mut self)
pub fn log(&mut self, level: &str, message: &str)
Auto Trait Implementations§
impl<'a> Freeze for MessageManager<'a>
impl<'a> RefUnwindSafe for MessageManager<'a>
impl<'a> Send for MessageManager<'a>
impl<'a> Sync for MessageManager<'a>
impl<'a> Unpin for MessageManager<'a>
impl<'a> UnwindSafe for MessageManager<'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> 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