vantage_api_client/vista/mod.rs
1//! Vista bridge for the REST API backend.
2//!
3//! Construct a `Vista` from a typed `Table<RestApi, E>` via
4//! `RestApi::vista_factory().from_table(...)`. The factory harvests
5//! schema metadata (columns, id field, references) and wraps the
6//! erased table in a `RestApiTableShell` that the universal Vista
7//! surface drives.
8//!
9//! REST APIs are read-only at this stage — the shell advertises only
10//! `can_count`.
11
12pub mod any_shell;
13pub mod factory;
14pub mod source;
15pub mod spec;
16
17pub use any_shell::AnyTableShell;
18pub use factory::{ModelResolver, RestApiVistaFactory};
19pub use source::RestApiTableShell;
20pub use spec::{
21 ApiColumnExtras, ApiReferenceExtras, ApiTableBlock, ApiTableExtras, NoApiExtras,
22 RestApiVistaSpec,
23};
24
25use crate::RestApi;
26
27impl RestApi {
28 /// Return a Vista factory bound to this REST API data source.
29 pub fn vista_factory(&self) -> RestApiVistaFactory {
30 RestApiVistaFactory::new(self.clone())
31 }
32}