pub struct MockMediaAssets(/* private fields */);Expand description
Media assets that each answer what the test set, at once, and keep each asset opened with the pictures asked of it. Every clone is the same assets.
Implementations§
Source§impl MockMediaAssets
impl MockMediaAssets
Sourcepub fn new(answers: AssetAnswers) -> MockMediaAssets
pub fn new(answers: AssetAnswers) -> MockMediaAssets
Assets that each answer answers.
Sourcepub fn set_answers(&self, answers: AssetAnswers)
pub fn set_answers(&self, answers: AssetAnswers)
Each asset answers answers from now on.
Sourcepub fn opened(&self) -> Vec<MockMediaAsset>
pub fn opened(&self) -> Vec<MockMediaAsset>
The assets opened, in order.
Trait Implementations§
Source§impl Clone for MockMediaAssets
impl Clone for MockMediaAssets
Source§impl MediaAssets for MockMediaAssets
impl MediaAssets for MockMediaAssets
Source§fn open(&self, url: &str) -> Box<dyn MediaAsset>
fn open(&self, url: &str) -> Box<dyn MediaAsset>
The media at
url, as a player opens it (Players::open): a link the system fetches,
or a picked file’s PickedFile::url. It reads nothing until
asked.Auto Trait Implementations§
impl !RefUnwindSafe for MockMediaAssets
impl !Send for MockMediaAssets
impl !Sync for MockMediaAssets
impl !UnwindSafe for MockMediaAssets
impl Forget for MockMediaAssets
impl Freeze for MockMediaAssets
impl Move for MockMediaAssets
impl Unpin for MockMediaAssets
impl UnsafeUnpin for MockMediaAssetswhere
*const RcInner<AssetsShared> is !null: UnsafeUnpin,
PhantomData<RcInner<AssetsShared>>: 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