Struct medea_jason::api::Room [−][src]
Room
where all the media happens (manages concrete PeerConnection
s,
handles media server events, etc).
For using Room
on JS side, consider the RoomHandle
.
Implementations
impl Room
[src]
pub fn new(rpc: Rc<dyn RpcSession>, media_manager: Rc<MediaManager>) -> Self
[src]
Creates new Room
and associates it with the provided RpcSession
.
pub fn close(self, reason: CloseReason)
[src]
Sets close_reason
and consumes this Room
.
Room
Drop
triggers on_close
callback with provided
CloseReason
.
pub fn set_close_reason(&self, reason: CloseReason)
[src]
Sets Room
’s CloseReason
to the provided value.
#[must_use]pub fn new_handle(&self) -> RoomHandle
[src]
Creates new RoomHandle
used by JS side. You can create them as many
as you need.
#[must_use]pub fn ptr_eq(&self, other: &Room) -> bool
[src]
Indicates whether this Room
reference is the same as the given
Room
reference. Compares pointers, not values.
#[must_use]pub fn inner_ptr_eq(&self, handle: &RoomHandle) -> bool
[src]
Checks RoomHandle
equality by comparing inner pointers.
#[must_use]pub fn downgrade(&self) -> WeakRoom
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Room
impl !Send for Room
impl !Sync for Room
impl Unpin for Room
impl !UnwindSafe for Room
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.