pub struct LanguageOptionGroup { /* private fields */ }Expand description
Owned wrapper around MPNowPlayingInfoLanguageOptionGroup.
Implementations§
Source§impl LanguageOptionGroup
impl LanguageOptionGroup
Sourcepub fn new(
language_options: &[LanguageOption],
default_language_option_index: Option<usize>,
allow_empty_selection: bool,
) -> Result<Self, MediaPlayerError>
pub fn new( language_options: &[LanguageOption], default_language_option_index: Option<usize>, allow_empty_selection: bool, ) -> Result<Self, MediaPlayerError>
Create a mutually-exclusive language option group.
§Errors
Returns MediaPlayerError::InvalidArgument when language_options is
empty or the requested default index is out of bounds.
pub fn count(&self) -> usize
pub fn default_language_option_index(&self) -> Option<usize>
pub fn allow_empty_selection(&self) -> bool
Trait Implementations§
Source§impl Clone for LanguageOptionGroup
impl Clone for LanguageOptionGroup
Source§impl Debug for LanguageOptionGroup
impl Debug for LanguageOptionGroup
Source§impl Drop for LanguageOptionGroup
impl Drop for LanguageOptionGroup
impl Send for LanguageOptionGroup
impl Sync for LanguageOptionGroup
Auto Trait Implementations§
impl Freeze for LanguageOptionGroup
impl RefUnwindSafe for LanguageOptionGroup
impl Unpin for LanguageOptionGroup
impl UnsafeUnpin for LanguageOptionGroup
impl UnwindSafe for LanguageOptionGroup
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