pub struct TuiFrame { /* private fields */ }Expand description
A captured TUI frame for testing
Implementations§
Source§impl TuiFrame
impl TuiFrame
Sourcepub fn from_grid(grid: &TextGrid, timestamp_ms: u64) -> Self
pub fn from_grid(grid: &TextGrid, timestamp_ms: u64) -> Self
Create a new TUI frame from a TextGrid
Sourcepub fn from_lines(lines: &[&str]) -> Self
pub fn from_lines(lines: &[&str]) -> Self
Create a frame from raw text lines
Sourcepub fn timestamp_ms(&self) -> u64
pub fn timestamp_ms(&self) -> u64
Get the timestamp
Sourcepub fn matches(&self, pattern: &str) -> ProbarResult<bool>
pub fn matches(&self, pattern: &str) -> ProbarResult<bool>
Check if the frame matches a regex pattern
Sourcepub fn find_matches(&self, pattern: &str) -> ProbarResult<Vec<&str>>
pub fn find_matches(&self, pattern: &str) -> ProbarResult<Vec<&str>>
Find all lines matching a pattern
Sourcepub fn is_identical(&self, other: &TuiFrame) -> bool
pub fn is_identical(&self, other: &TuiFrame) -> bool
Check if two frames are identical
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TuiFrame
impl<'de> Deserialize<'de> for TuiFrame
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TuiFrame
impl RefUnwindSafe for TuiFrame
impl Send for TuiFrame
impl Sync for TuiFrame
impl Unpin for TuiFrame
impl UnsafeUnpin for TuiFrame
impl UnwindSafe for TuiFrame
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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