Skip to main content

fizzy_sdk/
version.rs

1//! The SDK and API versions, and the `User-Agent` built from them.
2
3pub use crate::generated::API_VERSION;
4
5/// The SDK's own version, from Cargo.toml.
6pub const VERSION: &str = env!("CARGO_PKG_VERSION");
7
8/// The `User-Agent` requests go out with: the SDK and the API contract it was built
9/// against, which is how Fizzy sees what a client is working from.
10pub fn default_user_agent() -> String {
11    format!("fizzy-sdk-rust/{VERSION} (api:{API_VERSION})")
12}