[−][src]Enum soundio::ChannelId
ChannelId indicates the location or intent of a channel (left, right, LFE, etc.).
It supports the Display
trait so that you can convert ChannelId::FrontLeft
to "Front Left"
for example.
Examples
println!("Layout: {}", ChannelId::FrontLeftCenter); assert_eq!(format!("{}", ChannelId::MsMid), "Mid/Side Mid");
Variants
The more commonly supported ids.
The less commonly supported ids.
Mid/side recording
First order ambisonic channels
X-Y Recording
The "other" channel ids
Methods
impl ChannelId
[src]
pub fn parse(id: &str) -> Option<ChannelId>
[src]
Given UTF-8 encoded text which is the name of a channel such as
"Front Left", "FL", or "front-left", return the corresponding
ChannelId
. Returns None
for no match.
Examples
assert_eq!(ChannelId::parse("Front Left Center"), Some(ChannelId::FrontLeftCenter)); assert_eq!(ChannelId::parse("FLC"), Some(ChannelId::FrontLeftCenter)); assert_eq!(ChannelId::parse("front-left-of-center"), Some(ChannelId::FrontLeftCenter)); assert_eq!(ChannelId::parse("Shot is the best!"), None);
Trait Implementations
impl Clone for ChannelId
[src]
impl Copy for ChannelId
[src]
impl Debug for ChannelId
[src]
impl Display for ChannelId
[src]
impl Eq for ChannelId
[src]
impl From<ChannelId> for SoundIoChannelId
[src]
fn from(channel_id: ChannelId) -> SoundIoChannelId
[src]
impl From<SoundIoChannelId> for ChannelId
[src]
fn from(channel_id: SoundIoChannelId) -> ChannelId
[src]
impl PartialEq<ChannelId> for ChannelId
[src]
impl StructuralEq for ChannelId
[src]
impl StructuralPartialEq for ChannelId
[src]
Auto Trait Implementations
impl RefUnwindSafe for ChannelId
impl Send for ChannelId
impl Sync for ChannelId
impl Unpin for ChannelId
impl UnwindSafe for ChannelId
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,