Skip to main content

runlight/
lib.rs

1//! Runlight: privacy friendly web analytics that lives inside your app.
2//!
3//! This crate is the Rust version of Runlight, a port of the TypeScript SDK
4//! that answers every request the way it does and uses the same tables, so
5//! either one can read the other's database.
6
7#![forbid(unsafe_code)]
8
9use std::future::Future;
10use std::pin::Pin;
11
12pub mod accounts;
13#[cfg(feature = "tower")]
14pub mod adapters;
15pub mod assets;
16pub mod assistant;
17pub mod brand;
18pub mod connect;
19pub mod data;
20mod error;
21pub use error::Error;
22pub mod funnels;
23pub mod geo;
24pub mod goals;
25pub mod hash;
26pub mod http;
27pub mod icon;
28pub mod importers;
29pub mod intl;
30pub mod journeys;
31pub mod js;
32pub mod limit;
33pub mod links;
34pub mod mail;
35pub mod mcp;
36pub mod messages;
37pub mod mmdb;
38pub mod oauth;
39pub mod payload;
40pub mod query;
41pub mod routes;
42pub mod runlight;
43mod runlight_settings;
44pub use routes::{Routes, RoutesOptions, TokenOption};
45pub use runlight::{AppMailer, AppSend, Runlight, RunlightOptions, SiteOptions, TrustProxy};
46pub(crate) mod re;
47pub mod reports;
48pub mod safefetch;
49pub mod sources;
50pub mod store;
51pub mod time;
52pub mod ua;
53pub mod version;
54pub mod zip;
55
56/// A boxed future that can be sent between threads, as the crate's traits
57/// return.
58pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
59
60/// Any error, boxed.
61pub type BoxError = Box<dyn std::error::Error + Send + Sync>;