pub struct FrameSequence {
pub name: String,
pub frames: Vec<TuiSnapshot>,
pub duration_ms: u64,
}Expand description
Sequence of frames for animation testing
Fields§
§name: StringSequence name
frames: Vec<TuiSnapshot>Ordered list of frame snapshots
duration_ms: u64Total duration in milliseconds
Implementations§
Source§impl FrameSequence
impl FrameSequence
Sourcepub fn frame_at(&self, index: usize) -> Option<&TuiSnapshot>
pub fn frame_at(&self, index: usize) -> Option<&TuiSnapshot>
Get frame at index
Sourcepub fn first(&self) -> Option<&TuiSnapshot>
pub fn first(&self) -> Option<&TuiSnapshot>
Get the first frame
Sourcepub fn last(&self) -> Option<&TuiSnapshot>
pub fn last(&self) -> Option<&TuiSnapshot>
Get the last frame
Sourcepub fn matches(&self, other: &FrameSequence) -> bool
pub fn matches(&self, other: &FrameSequence) -> bool
Check if all frames in sequence match another sequence
Sourcepub fn diff_frames(&self, other: &FrameSequence) -> Vec<usize>
pub fn diff_frames(&self, other: &FrameSequence) -> Vec<usize>
Get frames that differ between sequences
Sourcepub fn save(&self, path: &Path) -> ProbarResult<()>
pub fn save(&self, path: &Path) -> ProbarResult<()>
Save sequence to YAML file
Sourcepub fn load(path: &Path) -> ProbarResult<Self>
pub fn load(path: &Path) -> ProbarResult<Self>
Load sequence from YAML file
Trait Implementations§
Source§impl Clone for FrameSequence
impl Clone for FrameSequence
Source§fn clone(&self) -> FrameSequence
fn clone(&self) -> FrameSequence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FrameSequence
impl Debug for FrameSequence
Source§impl<'de> Deserialize<'de> for FrameSequence
impl<'de> Deserialize<'de> for FrameSequence
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 FrameSequence
impl RefUnwindSafe for FrameSequence
impl Send for FrameSequence
impl Sync for FrameSequence
impl Unpin for FrameSequence
impl UnsafeUnpin for FrameSequence
impl UnwindSafe for FrameSequence
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