pub struct CastPlayer {
pub cast: CastFile,
pub elapsed_ms: u64,
pub event_index: usize,
pub paused: bool,
/* private fields */
}Expand description
Manages timed replay of a cast file.
Fields§
§cast: CastFile§elapsed_ms: u64§event_index: usize§paused: boolImplementations§
Source§impl CastPlayer
impl CastPlayer
pub fn new(cast: CastFile) -> Self
Sourcepub fn tick(&mut self, delta_ms: u64) -> bool
pub fn tick(&mut self, delta_ms: u64) -> bool
Advance playback by delta_ms. Returns true if new output was produced.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Returns true if all events have been played.
pub fn elapsed_ms(&self) -> u64
pub fn duration_ms(&self) -> u64
pub fn event_index(&self) -> usize
pub fn event_count(&self) -> usize
pub fn toggle_pause(&mut self)
pub fn seek_forward(&mut self, ms: u64)
pub fn seek_backward(&mut self, ms: u64)
Sourcepub fn seek_to(&mut self, target_ms: u64)
pub fn seek_to(&mut self, target_ms: u64)
Seek to an absolute time position, replaying from start.
pub fn progress(&self) -> f64
pub fn elapsed_display(&self) -> String
pub fn duration_display(&self) -> String
Auto Trait Implementations§
impl Freeze for CastPlayer
impl RefUnwindSafe for CastPlayer
impl Send for CastPlayer
impl Sync for CastPlayer
impl Unpin for CastPlayer
impl UnsafeUnpin for CastPlayer
impl UnwindSafe for CastPlayer
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
§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>
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§impl<T> JaggedSlice<T> for T
impl<T> JaggedSlice<T> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more