pub struct StreamingViewState {
pub scroll_offset: usize,
pub auto_scroll: bool,
/* private fields */
}Expand description
State for the streaming view widget
Fields§
§scroll_offset: usizeScroll offset (0 = bottom/most recent, higher = scrolled up)
auto_scroll: boolWhether to auto-scroll on new content
Implementations§
Source§impl StreamingViewState
impl StreamingViewState
Sourcepub fn scroll_down(&mut self, lines: usize)
pub fn scroll_down(&mut self, lines: usize)
Scroll down (show newer content)
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
Jump to bottom (most recent output)
Sourcepub fn scroll_to_top(&mut self)
pub fn scroll_to_top(&mut self)
Jump to top (oldest output)
Sourcepub fn set_total_lines(&mut self, total: usize)
pub fn set_total_lines(&mut self, total: usize)
Update total lines count (call before rendering)
Sourcepub fn is_at_bottom(&self) -> bool
pub fn is_at_bottom(&self) -> bool
Check if scrolled to bottom
Trait Implementations§
Source§impl Debug for StreamingViewState
impl Debug for StreamingViewState
Source§impl Default for StreamingViewState
impl Default for StreamingViewState
Source§fn default() -> StreamingViewState
fn default() -> StreamingViewState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamingViewState
impl RefUnwindSafe for StreamingViewState
impl Send for StreamingViewState
impl Sync for StreamingViewState
impl Unpin for StreamingViewState
impl UnwindSafe for StreamingViewState
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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