pub struct Engine { /* private fields */ }Implementations§
Source§impl Engine
impl Engine
pub fn status(&self) -> &Status
pub fn config(&self) -> &Config
pub fn store(&self) -> &Store
pub fn subtitles(&self) -> &Snapshot
pub fn playback_failed(&self) -> bool
Sourcepub fn change_station(
&mut self,
command: StationCommand,
) -> Result<StationChange>
pub fn change_station( &mut self, command: StationCommand, ) -> Result<StationChange>
Add, edit, remove, or change backup URLs without exposing session state.
Sourcepub fn toggle_favorite(&mut self, uuid: &str) -> Result<bool>
pub fn toggle_favorite(&mut self, uuid: &str) -> Result<bool>
Atomically toggle a favorite and return its new state.
pub fn bootstrap(&mut self) -> Result<usize>
Sourcepub fn sync(&mut self, progress: impl FnMut(usize)) -> Result<usize>
pub fn sync(&mut self, progress: impl FnMut(usize)) -> Result<usize>
Fetch and publish a full catalog. This call performs blocking I/O.
Sourcepub fn sync_with_policy(
&mut self,
progress: impl FnMut(usize),
accept_shrink: bool,
) -> Result<usize>
pub fn sync_with_policy( &mut self, progress: impl FnMut(usize), accept_shrink: bool, ) -> Result<usize>
Sync with explicit permission to accept a catalog shrink over 25%. This call performs blocking I/O.
Sourcepub fn refresh_station(&mut self, uuid: &str) -> Result<Option<Station>>
pub fn refresh_station(&mut self, uuid: &str) -> Result<Option<Station>>
Fetch current directory metadata without persisting it. Performs I/O.
Sourcepub fn report_click(&mut self, uuid: &str) -> Result<()>
pub fn report_click(&mut self, uuid: &str) -> Result<()>
Report a confirmed play to the directory. This call performs blocking I/O.
pub fn new(config: Config, stop: Arc<AtomicBool>) -> Result<Self>
pub fn play_episode( &mut self, id: &str, from_start: bool, speed: Option<f64>, ) -> Result<()>
pub fn play_podcast_queue(&mut self, auto_next: bool) -> Result<()>
pub fn seek_episode(&mut self, position: u64) -> Result<()>
pub fn podcast_speed(&mut self, rate: f64) -> Result<()>
pub fn podcast_auto_next(&mut self, on: bool) -> Result<()>
pub fn play(&mut self, uuid: &str) -> Result<()>
pub fn resume_last_station(&mut self) -> Result<()>
pub fn play_recording(&mut self, id: &str) -> Result<()>
pub fn random(&mut self, filter: Filter) -> Result<()>
pub fn podcast_action(&mut self, action: Action) -> Result<()>
pub fn podcast_tasks(&self) -> (usize, bool)
pub fn poll_podcast(&mut self) -> Option<Result<Value>>
pub fn cancel_podcast(&mut self) -> bool
pub fn tick(&mut self) -> Result<()>
pub fn set_subtitles(&mut self, enabled: bool)
pub fn retry_subtitles(&mut self)
pub fn clear_subtitles(&mut self)
pub fn set_subtitle_model(&mut self, id: String) -> Result<()>
pub fn pause(&mut self) -> Result<()>
pub fn mute(&mut self) -> Result<()>
pub fn volume(&mut self, delta: i32) -> Result<()>
pub fn stop_playback(&mut self) -> Result<()>
pub fn toggle_recording(&mut self) -> Result<()>
pub fn record_current( &mut self, duration: Option<Duration>, dir: Option<&Path>, ) -> Result<()>
pub fn standalone_record( &mut self, uuid: &str, duration: Option<Duration>, dir: Option<&Path>, ) -> Result<()>
pub fn stop_recording(&mut self, reason: Option<&str>) -> Result<()>
pub fn delete_recording(&mut self, id: String, index_only: bool) -> Result<()>
pub fn open_recordings(&mut self) -> Result<()>
pub fn playback_active(&self) -> bool
pub fn playback_error(&self) -> Option<&DomainError>
pub fn shutdown(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Engine
impl !RefUnwindSafe for Engine
impl !Sync for Engine
impl !UnwindSafe for Engine
impl Forget for Engine
impl Send for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 more