#[non_exhaustive]pub enum RtcTransport {
LivekitMultiSfu(LivekitMultiSfuTransport),
}client or server) and crate feature unstable-msc4143 only.Expand description
A MatrixRTC transport.
This type can hold arbitrary RTC transports. Their data can be accessed with
transport_type() and data().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LivekitMultiSfu(LivekitMultiSfuTransport)
unstable-msc4195 only.A LiveKit multi-SFU transport.
Implementations§
Source§impl RtcTransport
impl RtcTransport
Sourcepub fn new(transport_type: String, data: JsonObject) -> Result<Self>
pub fn new(transport_type: String, data: JsonObject) -> Result<Self>
A constructor to create a custom RTC transport.
Prefer to use the public variants of RtcTransport where possible; this constructor is
meant to be used for unsupported focus types only and does not allow setting arbitrary
data for supported ones.
§Errors
Returns an error if the transport_type is known and deserialization of data to the
corresponding RtcTransport variant fails.
Sourcepub fn transport_type(&self) -> &str
pub fn transport_type(&self) -> &str
Returns a reference to the type of this RTC transport.
Sourcepub fn data(&self) -> Cow<'_, JsonObject>
pub fn data(&self) -> Cow<'_, JsonObject>
Returns the associated data.
The returned JSON object won’t contain the type field, please use
transport_type() to access that.
Prefer to use the public variants of RtcTransport where possible; this method is meant
to be used for custom focus types only.
Trait Implementations§
Source§impl Clone for RtcTransport
impl Clone for RtcTransport
Source§fn clone(&self) -> RtcTransport
fn clone(&self) -> RtcTransport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RtcTransport
impl Debug for RtcTransport
Source§impl<'de> Deserialize<'de> for RtcTransport
impl<'de> Deserialize<'de> for RtcTransport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<LivekitMultiSfuTransport> for RtcTransport
Available on crate feature unstable-msc4195 only.
impl From<LivekitMultiSfuTransport> for RtcTransport
unstable-msc4195 only.Source§fn from(value: LivekitMultiSfuTransport) -> Self
fn from(value: LivekitMultiSfuTransport) -> Self
Source§impl PartialEq for RtcTransport
impl PartialEq for RtcTransport
Source§impl Serialize for RtcTransport
impl Serialize for RtcTransport
impl Eq for RtcTransport
impl StructuralPartialEq for RtcTransport
Auto Trait Implementations§
impl Freeze for RtcTransport
impl RefUnwindSafe for RtcTransport
impl Send for RtcTransport
impl Sync for RtcTransport
impl Unpin for RtcTransport
impl UnwindSafe for RtcTransport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.