pub struct RichLogState {
pub entries: Vec<RichLogEntry>,
pub auto_scroll: bool,
pub max_entries: Option<usize>,
/* private fields */
}Expand description
State for the rich log viewer widget.
Fields§
§entries: Vec<RichLogEntry>Log entries to display.
auto_scroll: boolWhether to auto-scroll to bottom when new entries are added.
max_entries: Option<usize>Maximum number of entries to keep (None = unlimited).
Implementations§
Source§impl RichLogState
impl RichLogState
Sourcepub fn push(&mut self, text: impl Into<String>, style: Style)
pub fn push(&mut self, text: impl Into<String>, style: Style)
Add a single-style entry to the log.
Sourcepub fn push_plain(&mut self, text: impl Into<String>)
pub fn push_plain(&mut self, text: impl Into<String>)
Add a plain text entry using default style.
Sourcepub fn push_segments(&mut self, segments: Vec<(String, Style)>)
pub fn push_segments(&mut self, segments: Vec<(String, Style)>)
Add a multi-segment styled entry to the log.
Trait Implementations§
Source§impl Clone for RichLogState
impl Clone for RichLogState
Source§fn clone(&self) -> RichLogState
fn clone(&self) -> RichLogState
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 Debug for RichLogState
impl Debug for RichLogState
Auto Trait Implementations§
impl Freeze for RichLogState
impl RefUnwindSafe for RichLogState
impl Send for RichLogState
impl Sync for RichLogState
impl Unpin for RichLogState
impl UnsafeUnpin for RichLogState
impl UnwindSafe for RichLogState
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