Skip to main content

Client

Struct Client 

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

Trusted native session; never serialize or log this value.

Implementations§

Source§

impl Client

Source

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

Old servers expose no parental marker. New servers must return this owner’s valid status.

Source

pub fn parental_status_admitted( &self, current: impl Fn() -> Result<(), String>, ) -> Result<Option<Value>, String>

Policy lookups retire busy retries with their captured account admission.

Source

pub fn external_parental_status_admitted( &self, current: impl Fn() -> Result<(), String>, ) -> Result<Option<Value>, String>

External media require fresh named authority before reusing an administrator or legacy exemption. Capable non-administrators already authenticate through their live owner-bound policy read.

Source

pub fn admit_snapshot(&self, snapshot: &Value) -> Result<(), String>

Recheck the live policy before serving a retained projection to a supervised account.

Source

pub fn admit_snapshot_admitted( &self, snapshot: &Value, current: impl Fn() -> Result<(), String>, ) -> Result<(), String>

Retained projection checks share the caller’s cancellable network admission.

Source

pub fn admit_artwork_snapshot(&self, snapshot: &Value) -> Result<(), String>

Admit retained images with at most one second of monotonic policy grace, shared only by clones of this login.

This cache never admits audio, downloads, output changes or a freshly read catalog. Expired or failed reads fail closed; a failure is not retained. Network and cached images use the same projection validation, while native process generations still fence account replacements.

Source

pub fn admit_artwork_snapshot_admitted( &self, snapshot: &Value, current: impl Fn() -> Result<(), String>, ) -> Result<(), String>

Native session admission remains independent of the one-second policy cache.

Source

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

Episode files cannot carry the account’s continuous listening limits into another player.

Source

pub fn require_unrestricted_download_admitted( &self, current: impl Fn() -> Result<(), String>, ) -> Result<(), String>

Retire the policy lookup before another account or cancelled transfer can dispatch a retry.

Source

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

An external player cannot enforce this server’s continuous listening limits.

Source

pub fn require_unrestricted_output_admitted( &self, current: impl Fn() -> Result<(), String>, ) -> Result<(), String>

Output preparation retains its caller’s cancellation and native session admission.

Source§

impl Client

Source

pub fn request( &self, method: &str, path: &str, query: &[(&str, &str)], body: Option<&Value>, ) -> Result<Value, String>

Explicit supported JSON operations; never accept a second authority or arbitrary URL.

Source

pub fn request_admitted( &self, method: &str, path: &str, query: &[(&str, &str)], body: Option<&Value>, current: impl Fn() -> Result<(), String>, ) -> Result<Value, String>

Check admission before/after every HTTP attempt; only GET may retry busy responses. Mutation bodies, bounded diagnostics and the original authority remain unchanged.

Source§

impl Client

Source

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

Synchronize complete same-epoch public projections under the cache’s shared JSON-byte limit. Oversized pages fail before retention; differing projection epochs allow three attempts.

Source

pub fn snapshot_admitted( &self, current: impl Fn() -> Result<(), String>, ) -> Result<Value, String>

Check the caller’s exact session before/after each policy, page and detail request. Retiring admission prevents follow-up IO; an already dispatched request may finish.

Source§

impl Client

Source

pub fn login_pinned( server: &str, username: &str, password: &str, certificate: &[u8], ) -> Result<Self, String>

Authenticate a trusted, explicitly imported or process-owned loopback identity. The exact supplied certificate is the sole HTTPS/WSS trust root; remote overrides are refused.

Source§

impl Client

Source

pub fn export_original( &self, reference: &str, stamp: &str, expected: u64, path: &Path, valid: &dyn Fn() -> Result<(), String>, progress: &dyn Fn(u64), ) -> Result<(), String>

Explicit bounded original export; binary bodies never cross the webview.

Source§

impl Client

Source

pub fn login( server: &str, username: &str, password: &str, ) -> Result<Self, String>

Authenticate only against the selected authority. Passwords are not retained.

Source

pub fn same_session(&self, other: &Self) -> bool

Compare native session identity without exposing its bearer credential.

Source

pub fn account(&self) -> Value

Public account metadata excludes the bearer credential.

Source

pub fn artwork(&self, reference: &str, kind: &str) -> Result<Vec<u8>, String>

Fetch only catalog-selected local artwork, never an external image URL.

Source

pub fn artwork_admitted( &self, reference: &str, kind: &str, current: impl Fn() -> Result<(), String>, ) -> Result<Vec<u8>, String>

Admit each artwork attempt to its captured native session, including busy retries.

Source

pub fn missing_cover( &self, artist: &str, group: &str, download: bool, ) -> Result<Vec<u8>, String>

Read an unowned group’s cached cover or explicitly request archive acquisition on Aède. Retain the session’s TLS identity while allowing a longer per-request timeout.

Source

pub fn spectrum_download(&self, reference: &str) -> Result<Vec<u8>, String>

Export a retained track spectrum at its original dimensions, without thumbnail rendering.

Source

pub fn spectrum_download_admitted( &self, reference: &str, current: impl Fn() -> Result<(), String>, ) -> Result<Vec<u8>, String>

Retire pending spectrum retries without publishing under a replacement session.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. 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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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.