#[non_exhaustive]pub struct QueueConfig<S>{
pub action_at_item_end: ActionAtItemEnd,
pub crossfade_settings: CrossfadeSettings,
pub max_concurrent_loads: NonZeroUsize,
pub cancel: Option<CancelToken>,
pub store: Option<AssetStore<S>>,
pub playback_order: PlaybackOrder,
pub runtime: Option<Handle>,
pub player: PlayerImpl<S>,
pub should_autoplay: bool,
pub prefetch_duration: f32,
pub max_history_size: usize,
}Expand description
Configuration for a Queue.
Holds queue-level defaults plus the owned PlayerImpl instance whose
item list the queue coordinates.
TrackSource::Uri resources share this queue’s
store. A caller-supplied ResourceConfig
retains its own store.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.action_at_item_end: ActionAtItemEnd§crossfade_settings: CrossfadeSettings§max_concurrent_loads: NonZeroUsizeMax concurrent background prefetch loads. Default: 3.
cancel: Option<CancelToken>Master cancel for the queue. Some threads the app master so the
queue subtree cascades from one app-wide owner; None falls back
to a fresh standalone token (test / library use). Must never be
None on the production app path.
store: Option<AssetStore<S>>Shared store used for bare URI track sources.
playback_order: PlaybackOrder§runtime: Option<Handle>Runtime the queue runs its loads and load completions on. None
takes the runtime current where the queue is built; an embedding
that drives the queue from threads without one (FFI hosts) passes
its own.
player: PlayerImpl<S>Player owned and decorated by this queue.
should_autoplay: boolWhether the queue starts playback by itself once the first track appended to a queue with nothing selected finishes loading. Off by default: the embedding decides when playback starts. A document cannot name it, because starting playback is the embedding’s choice.
prefetch_duration: f32Lead time in seconds before EOF at which the next queued track
is preloaded into the audio processor. Default: 3.5. Stays f32
seconds rather than the campaign’s humantime duration convention:
the value already reaches 10 setter and 14 read call sites as a bare
f32, and converting the type would only churn those for a
formatting preference.
max_history_size: usizeEntries the navigation history keeps. Only explicit selections and auto-advances land there, so the default is a listening session’s worth of back-steps; the queue’s own track list is unbounded.
Implementations§
Source§impl<S> QueueConfig<S>
impl<S> QueueConfig<S>
Sourcepub fn builder() -> QueueConfigBuilder<S>
pub fn builder() -> QueueConfigBuilder<S>
Create an instance of QueueConfig using the builder syntax
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for QueueConfig<S>
impl<S> !UnwindSafe for QueueConfig<S>
impl<S> Freeze for QueueConfig<S>
impl<S> Send for QueueConfig<S>
impl<S> Sync for QueueConfig<S>
impl<S> Unpin for QueueConfig<S>
impl<S> UnsafeUnpin for QueueConfig<S>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.