1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
// ┃ This file is part of the Perspective library, distributed under the terms ┃
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
//! The Rust language bindings for [Perspective](https://perspective-dev.github.io),
//! a high performance data-visualization and analytics component for the web
//! browser.
//!
//! # Examples
//!
//! A simple example which loads an [Apache Arrow](https://arrow.apache.org/) and
//! computes a "Group By" operation, returning a new Arrow.
//!
//! ```rust,no_run
//! use perspective::client::config::ViewConfigUpdate;
//! use perspective::client::{TableInitOptions, UpdateData, ViewWindow};
//! use perspective::server::{LocalClient, Server};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let server = Server::new(None);
//! let client = LocalClient::new(&server);
//! let arrow_data: Vec<u8> = vec![];
//! let data = UpdateData::Arrow(arrow_data.into());
//! let options = TableInitOptions::default();
//! let table = client.table(data.into(), options).await?;
//! let mut view_config = ViewConfigUpdate::default();
//! view_config.group_by = ["CounterParty", "Security"]
//! .iter()
//! .map(|x| Some(x.to_string()))
//! .collect();
//!
//! let view = table.view(Some(view_config)).await?;
//! let arrow = view.to_arrow(ViewWindow::default()).await?;
//! # Ok(())
//! # }
//! ```
//!
//! # See also
//!
//! - [`perspective-js`](https://docs.rs/perspective-js/latest/) for the
//! JavaScript API.
//! - [`perspective-python`](https://docs.rs/perspective-python/latest/) for the
//! Python API.
//! - [`perspective-server`](https://docs.rs/perspective-server/latest/) for
//! Data Binding details.
//! - [`perspective-client`](https://docs.rs/perspective-client/latest/) for the
//! Rust Client API
//! - [`perspective-viewer`](https://docs.rs/perspective-viewer/latest/) for the
//! WebAssembly `<perspective-viewer>` Custom Element API.
pub use proto;
pub use ;