Skip to main content

Engine

Struct Engine 

Source
pub struct Engine { /* private fields */ }
Expand description

App-owned local engine. Keeping its stdin open leases the server’s lifetime.

Implementations§

Source§

impl Engine

Source

pub fn new(root: PathBuf, executable: PathBuf) -> Self

Construct a manager for a fixed bundled executable and isolated app data. Unix roots reject shared write access; Windows retains inherited ACLs. Metadata admission does not provide race-proof filesystem confinement.

Source

pub fn copy_executable(&self) -> PathBuf

Fixed bundled engine for read-only staging scans and explicit destination copies.

Source

pub fn library_roots(&self) -> Result<Vec<PathBuf>, String>

All configured local library roots, including offline folders and while stopped. Never substitute an empty list for unreadable configuration or return credentials.

Source

pub fn status(&mut self) -> Result<Value, String>

Public configuration never returns credentials or service keys.

Source

pub fn start(&mut self) -> Result<Client, String>

Start or reuse only this process’s child, authenticating with a retained generated secret.

Source

pub fn stop(&mut self) -> Result<(), String>

Disable future startup; catalog, annotations and source files are retained.

Source

pub fn add_roots(&self, paths: &[PathBuf]) -> Result<(), String>

Register folders picked by the native dialog; scanning remains an explicit action.

Source

pub fn scan_request(&self, full: bool, threads: u64) -> Result<Value, String>

Build an explicit scan request, preserving known unmounted roots.

Source

pub fn accepted_scan(&self) -> Result<(), String>

Record accepted scan registration without pretending the task has completed.

Source

pub fn root_action(&self, path: &str, action: &str) -> Result<(), String>

Explicit watched-root/exclusion changes reuse the bundled engine’s CLI rules.

Source

pub fn configure_concerts( &self, key: Option<&str>, remove: bool, ) -> Result<Value, String>

Lock budget admission before changing a key: an occupied request cannot produce a false failed save. This local-only status projection never returns credentials or contacts the provider.

Source

pub fn concert_key(&self) -> Result<Option<String>, String>

Read the private concert-provider key only inside native Rust operations.

Source

pub fn concert_budget(&self) -> Result<Budget, String>

Lock the device-wide provider budget independently of the active Aède account.

Source

pub fn fetch_keys(&self) -> Result<Value, String>

Retained service keys are private Rust data, attached only to explicit fetch requests.

Source

pub fn keys( &mut self, fanart: &str, acoustid: &str, remove_fanart: bool, remove_acoustid: bool, ) -> Result<(), String>

Save explicitly supplied external keys; empty input preserves, removal is explicit.

Trait Implementations§

Source§

impl Drop for Engine

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.