pub struct MediaStreamHandle(pub Arc<dyn MediaStream>);Expand description
Cheap, cloneable reference a crate::Connection holds to its media flows.
Wraps an Arc<dyn MediaStream> so the trait object can live in Debug
types like Connection without forcing every adapter to implement Debug.
Tuple Fields§
§0: Arc<dyn MediaStream>Implementations§
Source§impl MediaStreamHandle
impl MediaStreamHandle
pub fn new(stream: Arc<dyn MediaStream>) -> MediaStreamHandle
pub fn id(&self) -> StreamId
pub fn kind(&self) -> StreamKind
pub fn stream(&self) -> &Arc<dyn MediaStream> ⓘ
Trait Implementations§
Source§impl Clone for MediaStreamHandle
impl Clone for MediaStreamHandle
Source§fn clone(&self) -> MediaStreamHandle
fn clone(&self) -> MediaStreamHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for MediaStreamHandle
impl !UnwindSafe for MediaStreamHandle
impl Freeze for MediaStreamHandle
impl Send for MediaStreamHandle
impl Sync for MediaStreamHandle
impl Unpin for MediaStreamHandle
impl UnsafeUnpin for MediaStreamHandle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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