redseat-api 0.8.0

Rust client for Redseat media servers
Documentation
//! The state every Redseat app shows (feature `app`), so each app only draws it: a
//! desktop app on GPUI, an Exact app, native mobile apps through bindings.
//!
//! - [`ServerCopy`]: a server through its local copy ([`Mirror`](crate::Mirror)): the
//!   connection in the background, the libraries in the sidebar's order, a library as
//!   its grid shows it ([`LibraryView`]: its count, held still while it syncs, and the
//!   sync's progress), its medias in the grid's order, the names of its people and
//!   tags, and where its files are.
//! - [`TokenStore`]: the cloud session token between runs.
//! - [`details`]: a media's details as label and value rows.
//! - [`text`]: what the screens say: durations, sizes, the sync's progress, cloud
//!   errors.
//!
//! The state is read, not pushed: an app reads what it shows, and reads it again when
//! a [`Change`] says it changed. That fits every UI: an Exact source observes a topic,
//! a GPUI view calls `cx.notify()`, a SwiftUI or Compose model publishes the value
//! read. Reads of the copy are async (SQLite); the rest answers at once.
//!
//! The module starts no runtime of its own: on native targets [`ServerCopy::open`] runs
//! on the tokio runtime it is called in, and [`ServerCopy::with_mirror`] takes the
//! app's [`Runtime`](crate::mirror::Runtime), as the mirror does.

pub mod details;
#[cfg(feature = "mirror")]
mod server;
pub mod text;
mod tokens;

#[cfg(feature = "mirror")]
pub use crate::mirror::{ItemIds, Related, RelatedEpisode, SyncKind};
#[cfg(feature = "mirror")]
pub use server::{
    BIG_SYNC, BURST, Change, FIRST_WAIT, Ids, LibraryView, MAX_IDS, OnChange, Reach, ServerCopy,
    grid_query, media_file_url, sort_libraries, thumb_url,
};
pub use tokens::TokenStore;