pub fn try_from<'a, T, I>(iter: I) -> Result<Self, ot::ChannelOutOfRange>
    where
        T: 'a + TryInto<ChannelIndex> + Copy,
        I: IntoIterator<Item = &'a T>,
    {
        let mut ret = Self::default();
        for &channel in iter {
            ret.try_insert(channel.try_into().map_err(|_| ot::ChannelOutOfRange)?)?;
        }
        Ok(ret)
    }
/// Tries to create a new channel mask from an iterator of channel indexes.
Tries to create a new channel mask from an iterator of channel indexes.
Tries to create a new channel mask from an iterator of channel indexes .
pub fn try_from<'a, T, I>(iter: I) -> Result<Self, ot::ChannelOutOfRange>
    where
        T: 'a + TryInto<ChannelIndex> + Copy,
        I: IntoIterator<Item = &'a T>,
    {
        let mut ret = Self::default();
        for &channel in iter {
            ret.try_insert(channel.try_into().map_err(|_| ot::ChannelOutOfRange)?)?;
        }
        Ok(ret)
    }
pub fn try_from < ' a , T , I > ( iter : I ) -> Result < Self , ot :: ChannelOutOfRange > where T : ' a + TryInto < ChannelIndex > + Copy , I : IntoIterator < Item = & ' a T > , { let mut ret = Self :: default ( ) ; for & channel in iter { ret . try_insert ( channel . try_into ( ) . map_err ( | _ | ot :: ChannelOutOfRange ) ? ) ? ; } Ok ( ret ) }
Tries to create a new channel mask from an iterator of channel indexes.
Tries to create a new channel mask from an iterator of channel indexes .
iter
I
iter
I