#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
mod error;
pub mod models;
mod webhooks;
#[cfg(feature = "blocking")]
#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
pub mod blocking;
#[cfg(feature = "async")]
mod client;
#[cfg(feature = "testing")]
#[cfg_attr(docsrs, doc(cfg(feature = "testing")))]
pub mod testing;
#[cfg(feature = "async")]
mod transport;
pub use error::{Error, ErrorCode, Result};
pub use webhooks::*;
#[cfg(feature = "async")]
#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
pub use client::{
AssetsClient, CdnClient, CdnResponse, EventsClient, FoldersClient, ServerClient,
ServerClientBuilder, TextClient, UploadTokensClient, DEFAULT_BASE_URL, DEFAULT_CDN_BASE_URL,
ENSURE_LENSES_MAX_PER_REQUEST,
};
#[cfg(feature = "async")]
pub use transport::MAX_RESPONSE_BYTES;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn user_agent() -> String {
format!(
"calmlens-rust/{VERSION} (rustc {})",
env!("CALMLENS_RUSTC_VERSION")
)
}
#[cfg(feature = "async")]
pub type ByteStream = std::pin::Pin<
Box<
dyn futures_util::Stream<
Item = std::result::Result<bytes::Bytes, Box<dyn std::error::Error + Send + Sync>>,
> + Send,
>,
>;
pub use bytes::Bytes;