pub struct Client { /* private fields */ }Expand description
Trusted native session; never serialize or log this value.
Implementations§
Source§impl Client
impl Client
Sourcepub fn parental_status(&self) -> Result<Option<Value>, String>
pub fn parental_status(&self) -> Result<Option<Value>, String>
Old servers expose no parental marker. New servers must return this owner’s valid status.
Sourcepub fn parental_status_admitted(
&self,
current: impl Fn() -> Result<(), String>,
) -> Result<Option<Value>, String>
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.
Sourcepub fn external_parental_status_admitted(
&self,
current: impl Fn() -> Result<(), String>,
) -> Result<Option<Value>, String>
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.
Sourcepub fn admit_snapshot(&self, snapshot: &Value) -> Result<(), String>
pub fn admit_snapshot(&self, snapshot: &Value) -> Result<(), String>
Recheck the live policy before serving a retained projection to a supervised account.
Sourcepub fn admit_snapshot_admitted(
&self,
snapshot: &Value,
current: impl Fn() -> Result<(), String>,
) -> Result<(), String>
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.
Sourcepub fn admit_artwork_snapshot(&self, snapshot: &Value) -> Result<(), String>
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.
Sourcepub fn admit_artwork_snapshot_admitted(
&self,
snapshot: &Value,
current: impl Fn() -> Result<(), String>,
) -> Result<(), String>
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.
Sourcepub fn require_unrestricted_download(&self) -> Result<(), String>
pub fn require_unrestricted_download(&self) -> Result<(), String>
Episode files cannot carry the account’s continuous listening limits into another player.
Sourcepub fn require_unrestricted_download_admitted(
&self,
current: impl Fn() -> Result<(), String>,
) -> Result<(), String>
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.
Sourcepub fn require_unrestricted_output(&self) -> Result<(), String>
pub fn require_unrestricted_output(&self) -> Result<(), String>
An external player cannot enforce this server’s continuous listening limits.
Source§impl Client
impl Client
Sourcepub fn request(
&self,
method: &str,
path: &str,
query: &[(&str, &str)],
body: Option<&Value>,
) -> Result<Value, String>
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.
Sourcepub fn request_admitted(
&self,
method: &str,
path: &str,
query: &[(&str, &str)],
body: Option<&Value>,
current: impl Fn() -> Result<(), String>,
) -> Result<Value, String>
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
impl Client
Source§impl Client
impl Client
Sourcepub fn login(
server: &str,
username: &str,
password: &str,
) -> Result<Self, String>
pub fn login( server: &str, username: &str, password: &str, ) -> Result<Self, String>
Authenticate only against the selected authority. Passwords are not retained.
Sourcepub fn same_session(&self, other: &Self) -> bool
pub fn same_session(&self, other: &Self) -> bool
Compare native session identity without exposing its bearer credential.
Sourcepub fn artwork(&self, reference: &str, kind: &str) -> Result<Vec<u8>, String>
pub fn artwork(&self, reference: &str, kind: &str) -> Result<Vec<u8>, String>
Fetch only catalog-selected local artwork, never an external image URL.
Sourcepub fn artwork_admitted(
&self,
reference: &str,
kind: &str,
current: impl Fn() -> Result<(), String>,
) -> Result<Vec<u8>, String>
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.
Sourcepub fn missing_cover(
&self,
artist: &str,
group: &str,
download: bool,
) -> Result<Vec<u8>, String>
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.