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 with_configs( &mut self, configs: Result<Vec<MediaCodecConfig>, MediaTaskError>, ) -> &mut Self
pub fn with_direction(&mut self, direction: EndpointType) -> &mut Self
pub fn new_reconfigurable() -> Self
pub fn new_delayable() -> Self
Sourcepub fn builder(&self) -> Box<dyn MediaTaskBuilder>
pub fn builder(&self) -> Box<dyn MediaTaskBuilder>
Returns a type that implements MediaTaskBuilder. When a MediaTask is built using
configure(), it will be available 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