pub struct MessageDisplay { /* private fields */ }Implementations§
Source§impl MessageDisplay
impl MessageDisplay
pub fn new(config: &Config, terminal_width: u16, terminal_height: u16) -> Self
pub fn update_config(&mut self, new_config: &Config)
pub fn handle_viewport_event(&mut self, event: ViewportEvent) -> bool
pub fn handle_resize(&mut self, width: u16, height: u16) -> bool
pub fn clear_messages(&mut self)
pub fn add_message(&mut self, content: String)
pub fn update_typewriter(&mut self)
pub fn handle_scroll(&mut self, direction: ScrollDirection, amount: usize)
pub fn get_content_height(&self) -> usize
pub fn get_window_height(&self) -> usize
pub fn get_visible_messages(&self) -> Vec<(String, usize, bool, bool, bool)>
pub fn create_output_widget_for_rendering( &self, ) -> (Vec<(String, usize, bool, bool, bool)>, Config, LayoutArea, &'_ UiCursor)
pub fn viewport(&self) -> &Viewport
pub fn viewport_mut(&mut self) -> &mut Viewport
pub fn debug_scroll_status(&self) -> String
pub fn log(&mut self, level: &str, message: &str)
pub fn get_messages_count(&self) -> usize
Auto Trait Implementations§
impl Freeze for MessageDisplay
impl RefUnwindSafe for MessageDisplay
impl Send for MessageDisplay
impl Sync for MessageDisplay
impl Unpin for MessageDisplay
impl UnwindSafe for MessageDisplay
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