pub struct GifRecorder { /* private fields */ }Expand description
GIF Recorder for capturing test execution
§Example
ⓘ
let mut recorder = GifRecorder::new(GifConfig::new(800, 600));
recorder.start()?;
// Capture frames during test execution
for screenshot in screenshots {
recorder.capture_frame(&screenshot)?;
}
let gif_data = recorder.stop()?;
recorder.save(Path::new("test_recording.gif"))?;Implementations§
Source§impl GifRecorder
impl GifRecorder
Sourcepub fn is_recording(&self) -> bool
pub fn is_recording(&self) -> bool
Check if recording is in progress
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Get the number of captured frames
Sourcepub fn start(&mut self) -> ProbarResult<()>
pub fn start(&mut self) -> ProbarResult<()>
Sourcepub fn capture_frame(&mut self, screenshot: &Screenshot) -> ProbarResult<()>
pub fn capture_frame(&mut self, screenshot: &Screenshot) -> ProbarResult<()>
Sourcepub fn add_frame(&mut self, frame: GifFrame) -> ProbarResult<()>
pub fn add_frame(&mut self, frame: GifFrame) -> ProbarResult<()>
Sourcepub fn stop(&mut self) -> ProbarResult<Vec<u8>>
pub fn stop(&mut self) -> ProbarResult<Vec<u8>>
Sourcepub fn encoded_data(&self) -> Option<&[u8]>
pub fn encoded_data(&self) -> Option<&[u8]>
Get the encoded GIF data (if available)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GifRecorder
impl RefUnwindSafe for GifRecorder
impl Send for GifRecorder
impl Sync for GifRecorder
impl Unpin for GifRecorder
impl UnsafeUnpin for GifRecorder
impl UnwindSafe for GifRecorder
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> 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