pub struct WeakDataProducer { /* private fields */ }
Expand description
WeakDataProducer
doesn’t own data producer instance on mediasoup-worker and will not prevent
one from being destroyed once last instance of regular DataProducer
is dropped.
WeakDataProducer
vs DataProducer
is similar to Weak
vs Arc
.
Implementations§
Source§impl WeakDataProducer
impl WeakDataProducer
Sourcepub fn upgrade(&self) -> Option<DataProducer>
pub fn upgrade(&self) -> Option<DataProducer>
Attempts to upgrade WeakDataProducer
to DataProducer
if last instance of one wasn’t
dropped yet.
Trait Implementations§
Source§impl Clone for WeakDataProducer
impl Clone for WeakDataProducer
Source§fn clone(&self) -> WeakDataProducer
fn clone(&self) -> WeakDataProducer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for WeakDataProducer
impl !RefUnwindSafe for WeakDataProducer
impl Send for WeakDataProducer
impl Sync for WeakDataProducer
impl Unpin for WeakDataProducer
impl !UnwindSafe for WeakDataProducer
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