arb_lib/lib.rs
1//! Translate Flutter application resource bundles.
2//!
3//! # Examples
4//!
5//! Create a translation application resource bundle:
6//!
7//! ```
8//! use arb_lib::{Intl, deepl::{DeeplApi, ApiOptions, Lang}};
9//!
10//! let api_key: std::env::var("DEEPL_API_KEY").unwrap();
11//! let api = DeeplApi::new(ApiOptions::new(api_key));
12//! let options = TranslationOptions::new(Lang::Fr);
13//! let mut intl = Intl::new("l10n.yaml")?;
14//! let result = intl.translate(&api, options).await?;
15//! println!("{:#?}", result);
16//! ```
17#![deny(missing_docs)]
18#![forbid(unsafe_code)]
19
20mod arb;
21mod error;
22mod intl;
23
24pub use arb::*;
25pub use error::Error;
26pub use intl::*;
27
28/// Result type for the library.
29pub type Result<T> = std::result::Result<T, Error>;
30
31pub use deepl;