pub struct Config<const CH: usize> { /* private fields */ }Expand description
Implementations§
Source§impl<const CH: usize> Config<CH>
impl<const CH: usize> Config<CH>
Sourcepub const fn try_new(
streams: u8,
coupled_streams: u8,
mapping: [u8; CH],
) -> Option<Self>
pub const fn try_new( streams: u8, coupled_streams: u8, mapping: [u8; CH], ) -> Option<Self>
Creates new config, verifying that specified number of channels is valid and do not exceed CH
Following constraints are imposed:
streamscannot be 0 or exceedCHcoupled_streamscannot exceedstreams- Sum of both cannot exceed
CH
Sourcepub const fn new(streams: u8, coupled_streams: u8, mapping: [u8; CH]) -> Self
pub const fn new(streams: u8, coupled_streams: u8, mapping: [u8; CH]) -> Self
Creates new config, verifying that specified number of channels is valid and do not exceed CH
Following constraints are imposed and will cause panic:
streamscannot be 0 or exceedCHcoupled_streamscannot exceedstreams- Sum of both cannot exceed
CH
Sourcepub fn mapping_mut(&mut self) -> &mut [u8; CH]
pub fn mapping_mut(&mut self) -> &mut [u8; CH]
Accesses mapping
Auto Trait Implementations§
impl<const CH: usize> Freeze for Config<CH>
impl<const CH: usize> RefUnwindSafe for Config<CH>
impl<const CH: usize> Send for Config<CH>
impl<const CH: usize> Sync for Config<CH>
impl<const CH: usize> Unpin for Config<CH>
impl<const CH: usize> UnwindSafe for Config<CH>
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
Mutably borrows from an owned value. Read more