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::RestApiVistaFactory;
19pub use source::RestApiTableShell;
20pub use spec::{NoApiExtras, RestApiVistaSpec};
21
22use crate::RestApi;
23
24impl RestApi {
25 /// Return a Vista factory bound to this REST API data source.
26 pub fn vista_factory(&self) -> RestApiVistaFactory {
27 RestApiVistaFactory::new(self.clone())
28 }
29}