pub struct TextLogState { /* private fields */ }Expand description
A text log’s state between passes: its filters, Follow, the bodies expanded, the table’s own state and the filter’s result.
Implementations§
Source§impl TextLogState
impl TextLogState
pub fn new() -> Self
Sourcepub fn level_shown(&self, level: Level) -> bool
pub fn level_shown(&self, level: Level) -> bool
Whether lines of level are shown (all are by default).
Sourcepub fn set_level_shown(&mut self, level: Level, on: bool)
pub fn set_level_shown(&mut self, level: Level, on: bool)
Shows or hides the lines of level.
Sourcepub fn set_filter(&mut self, text: impl Into<String>)
pub fn set_filter(&mut self, text: impl Into<String>)
Shows only the lines whose body or entity path holds text, case
aside.
Sourcepub fn follow(&self) -> bool
pub fn follow(&self) -> bool
Whether Follow is on: the last line kept in view as lines come in.
Sourcepub fn set_follow(&mut self, on: bool)
pub fn set_follow(&mut self, on: bool)
Turns Follow on (bringing the last line into view) or off.
Sourcepub fn is_expanded(&self, index: usize) -> bool
pub fn is_expanded(&self, index: usize) -> bool
Whether entry index’s body shows all its lines.
Sourcepub fn set_expanded(&mut self, index: usize, on: bool)
pub fn set_expanded(&mut self, index: usize, on: bool)
Shows all the lines of entry index’s body, or its first one.
Sourcepub fn count(&self, level: Level) -> usize
pub fn count(&self, level: Level) -> usize
How many entries of level match the text filter (shown or not).
Sourcepub fn refilter(&mut self)
pub fn refilter(&mut self)
Filters again from the first entry at the next pass: after the
entries changed otherwise than by growing at their end, or the
application’s own filter (TextLog::keep) changed.
Sourcepub fn table(&self) -> &TableState<usize>
pub fn table(&self) -> &TableState<usize>
The table’s own state (its selection is the rows at the time cursor).
Trait Implementations§
Source§impl Debug for TextLogState
impl Debug for TextLogState
Auto Trait Implementations§
impl Freeze for TextLogState
impl RefUnwindSafe for TextLogState
impl Send for TextLogState
impl Sync for TextLogState
impl Unpin for TextLogState
impl UnsafeUnpin for TextLogState
impl UnwindSafe for TextLogState
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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