#[non_exhaustive]pub struct AudioEndpoint {
pub destination: Option<String>,
pub variables: Option<Variables>,
}Expand description
Audio device endpoint for portaudio, pulseaudio, or ALSA modules.
Wire format: {module}[/{destination}] where destination is typically
empty or auto_answer (recognized by portaudio and pulseaudio).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.destination: Option<String>Destination string (e.g. auto_answer). None for bare module name.
variables: Option<Variables>Per-channel variables prepended as {key=value}.
Implementations§
Source§impl AudioEndpoint
impl AudioEndpoint
Sourcepub fn with_destination(self, destination: impl Into<String>) -> Self
pub fn with_destination(self, destination: impl Into<String>) -> Self
Set the destination string.
Sourcepub fn with_variables(self, variables: Variables) -> Self
pub fn with_variables(self, variables: Variables) -> Self
Set per-channel variables.
Sourcepub fn fmt_with_prefix(&self, f: &mut Formatter<'_>, prefix: &str) -> Result
pub fn fmt_with_prefix(&self, f: &mut Formatter<'_>, prefix: &str) -> Result
Format with the given module prefix (portaudio, pulseaudio, alsa).
Sourcepub fn parse_with_prefix(s: &str, prefix: &str) -> Result<Self, OriginateError>
pub fn parse_with_prefix(s: &str, prefix: &str) -> Result<Self, OriginateError>
Parse from a dial string with the given module prefix.
Trait Implementations§
Source§impl Clone for AudioEndpoint
impl Clone for AudioEndpoint
Source§fn clone(&self) -> AudioEndpoint
fn clone(&self) -> AudioEndpoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AudioEndpoint
impl Debug for AudioEndpoint
Source§impl Default for AudioEndpoint
impl Default for AudioEndpoint
Source§fn default() -> AudioEndpoint
fn default() -> AudioEndpoint
Source§impl<'de> Deserialize<'de> for AudioEndpoint
impl<'de> Deserialize<'de> for AudioEndpoint
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 DialString for AudioEndpoint
impl DialString for AudioEndpoint
Source§impl Display for AudioEndpoint
Warning: This Display impl exists only to satisfy the DialString: Display
trait bound. The "audio" prefix is not a valid FreeSWITCH endpoint.
Always use AudioEndpoint through Endpoint::PortAudio,
Endpoint::PulseAudio, or
Endpoint::Alsa which call
fmt_with_prefix with the correct module name.
impl Display for AudioEndpoint
Warning: This Display impl exists only to satisfy the DialString: Display
trait bound. The "audio" prefix is not a valid FreeSWITCH endpoint.
Always use AudioEndpoint through Endpoint::PortAudio,
Endpoint::PulseAudio, or
Endpoint::Alsa which call
fmt_with_prefix with the correct module name.
Source§impl PartialEq for AudioEndpoint
impl PartialEq for AudioEndpoint
Source§impl Serialize for AudioEndpoint
impl Serialize for AudioEndpoint
impl Eq for AudioEndpoint
impl StructuralPartialEq for AudioEndpoint
Auto Trait Implementations§
impl Freeze for AudioEndpoint
impl RefUnwindSafe for AudioEndpoint
impl Send for AudioEndpoint
impl Sync for AudioEndpoint
impl Unpin for AudioEndpoint
impl UnsafeUnpin for AudioEndpoint
impl UnwindSafe for AudioEndpoint
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.