pub struct MockPlayer(/* private fields */);Expand description
A player the app opened, as the test sees it. Every clone is the same player.
Implementations§
Source§impl MockPlayer
impl MockPlayer
Sourcepub fn calls(&self) -> Vec<PlayerCall>
pub fn calls(&self) -> Vec<PlayerCall>
What the player was asked, in order.
Sourcepub fn video_layer(&self) -> Option<Arc<dyn CompositionLayer>>
pub fn video_layer(&self) -> Option<Arc<dyn CompositionLayer>>
The layer the player’s picture is on; None once it is sent nowhere, or to a frame
reader.
Sourcepub fn frame_reader(&self) -> Option<Arc<dyn VideoFrameReader>>
pub fn frame_reader(&self) -> Option<Arc<dyn VideoFrameReader>>
The reader the player’s frames go to; None once its picture is sent nowhere, or to a
layer.
Sourcepub fn is_dropped(&self) -> bool
pub fn is_dropped(&self) -> bool
Whether the app let go of the player.
Sourcepub fn set_state(&self, state: PlayerState)
pub fn set_state(&self, state: PlayerState)
Reports state from now on, as the system would have changed it.
Sourcepub fn move_to(&self, position: Duration)
pub fn move_to(&self, position: Duration)
Answers position from now on, telling the app nothing, as a playing player moves on.
Sourcepub fn jump_to(&self, position: Duration)
pub fn jump_to(&self, position: Duration)
Answers position from now on, telling the app it jumped, as a seek landing or a loop
does.
Sourcepub fn set_metadata(&self, metadata: MediaMetadata)
pub fn set_metadata(&self, metadata: MediaMetadata)
Reports metadata from now on, as the system would have read it from the media.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MockPlayer
impl !Send for MockPlayer
impl !Sync for MockPlayer
impl !UnwindSafe for MockPlayer
impl Forget for MockPlayer
impl Freeze for MockPlayer
impl Move for MockPlayer
impl Unpin for MockPlayer
impl UnsafeUnpin for MockPlayerwhere
*const RcInner<PlayerShared> is !null: UnsafeUnpin,
PhantomData<RcInner<PlayerShared>>: UnsafeUnpin,
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