#[non_exhaustive]pub struct MusicSwitch {
pub out_ms: u32,
pub in_ms: u32,
pub overlap: bool,
}Expand description
How one music track gives way to the next (ADR-0054): the old one
fades out over out_ms, and the new one fades in over in_ms,
starting as the old one begins to fade (overlap, a crossfade) or once
it has stopped. Build it with new,
after_fade or crossfade
(ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.out_ms: u32How long the old track fades out, in milliseconds.
in_ms: u32How long the new track fades in, in milliseconds (0: it starts at full gain).
overlap: boolWhether the new track starts when the old one begins to fade (a crossfade), or after it has stopped.
Implementations§
Source§impl MusicSwitch
impl MusicSwitch
Trait Implementations§
Source§impl Clone for MusicSwitch
impl Clone for MusicSwitch
Source§fn clone(&self) -> MusicSwitch
fn clone(&self) -> MusicSwitch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MusicSwitch
Source§impl Debug for MusicSwitch
impl Debug for MusicSwitch
impl Eq for MusicSwitch
Source§impl PartialEq for MusicSwitch
impl PartialEq for MusicSwitch
impl StructuralPartialEq for MusicSwitch
Auto Trait Implementations§
impl Freeze for MusicSwitch
impl RefUnwindSafe for MusicSwitch
impl Send for MusicSwitch
impl Sync for MusicSwitch
impl Unpin for MusicSwitch
impl UnsafeUnpin for MusicSwitch
impl UnwindSafe for MusicSwitch
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