Struct bt_a2dp::media_task::tests::TestMediaTaskBuilder
source · pub struct TestMediaTaskBuilder { /* private fields */ }
Expand description
A TestMediaTask expects to be configured once, and then started and stopped as appropriate. It will Error if started again while started or stopped while stopped, or if it was configured multiple times.
Implementations§
source§impl TestMediaTaskBuilder
impl TestMediaTaskBuilder
pub fn new() -> Self
pub fn new_reconfigurable() -> Self
pub fn new_delayable() -> Self
sourcepub fn builder(&self) -> impl MediaTaskBuilder
pub fn builder(&self) -> impl MediaTaskBuilder
Returns a type that implements MediaTaskBuilder. When a MediaTask is built using
configure(), it will be avialable from next_task
.
sourcepub fn next_task(&mut self) -> impl Future<Output = Option<TestMediaTask>> + '_
pub fn next_task(&mut self) -> impl Future<Output = Option<TestMediaTask>> + '_
Gets a future that will return a handle to the next TestMediaTask that gets started from a Runner that was retrieved from this builder. The TestMediaTask, can tell you when it’s started and give you a handle to the MediaStream.
sourcepub fn expect_task(&mut self) -> TestMediaTask
pub fn expect_task(&mut self) -> TestMediaTask
Expects that a task had been built, and retrieves that task, or panics.
Auto Trait Implementations§
impl !Freeze for TestMediaTaskBuilder
impl !RefUnwindSafe for TestMediaTaskBuilder
impl Send for TestMediaTaskBuilder
impl Sync for TestMediaTaskBuilder
impl Unpin for TestMediaTaskBuilder
impl !UnwindSafe for TestMediaTaskBuilder
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