pub struct MediaPolicy {
pub profile: MediaProfile,
pub codecs: Codecs,
pub ice: IcePolicy,
pub keying: Keying,
}Expand description
The media choices shared by dialing and answering a call.
Fields§
§profile: MediaProfileNamed composition policy.
codecs: CodecsWhich codecs are offered and accepted.
ice: IcePolicyWhether and how the initial exchange gathers ICE candidates.
keying: KeyingWhich media keying mechanism the application selected.
Implementations§
Source§impl MediaPolicy
impl MediaPolicy
Sourcepub const fn browser_audio() -> Self
pub const fn browser_audio() -> Self
The fail-closed browser-audio policy.
Feature availability and WSS are checked before media binding or gathering. The value is constructible in every build so a missing Opus or DTLS feature produces a typed setup error instead of turning a known profile name into an unknown configuration value.
Sourcepub const fn with_profile(self, profile: MediaProfile) -> Self
pub const fn with_profile(self, profile: MediaProfile) -> Self
Select a named profile while retaining explicit lower-level choices.
The browser-audio preflight still refuses any incompatible retained choice; this method does not silently rewrite it.
Sourcepub const fn with_codecs(self, codecs: Codecs) -> Self
pub const fn with_codecs(self, codecs: Codecs) -> Self
Select a codec set while retaining the other media choices.
Sourcepub const fn with_ice(self, ice: IcePolicy) -> Self
pub const fn with_ice(self, ice: IcePolicy) -> Self
Select an ICE policy while retaining the other media choices.
Sourcepub const fn with_keying(self, keying: Keying) -> Self
pub const fn with_keying(self, keying: Keying) -> Self
Select the media keying while retaining the codec and ICE choices.
Trait Implementations§
Source§impl Clone for MediaPolicy
impl Clone for MediaPolicy
Source§fn clone(&self) -> MediaPolicy
fn clone(&self) -> MediaPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MediaPolicy
impl Debug for MediaPolicy
Source§impl Default for MediaPolicy
impl Default for MediaPolicy
Source§fn default() -> MediaPolicy
fn default() -> MediaPolicy
Source§impl PartialEq for MediaPolicy
impl PartialEq for MediaPolicy
Source§fn eq(&self, other: &MediaPolicy) -> bool
fn eq(&self, other: &MediaPolicy) -> bool
self and other values to be equal, and is used by ==.impl Copy for MediaPolicy
impl Eq for MediaPolicy
impl StructuralPartialEq for MediaPolicy
Auto Trait Implementations§
impl Freeze for MediaPolicy
impl RefUnwindSafe for MediaPolicy
impl Send for MediaPolicy
impl Sync for MediaPolicy
impl Unpin for MediaPolicy
impl UnsafeUnpin for MediaPolicy
impl UnwindSafe for MediaPolicy
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more