paypal_rust/client/app_info.rs
1/// Represents the library consumer's application information.
2pub struct AppInfo {
3 pub name: String,
4 pub version: String,
5 pub website: Option<String>,
6}
7
8impl ToString for AppInfo {
9 fn to_string(&self) -> String {
10 let mut app_info = format!("{} {}", self.name, self.version);
11
12 if let Some(website) = &self.website {
13 app_info.push_str(&format!(" ({website})"));
14 }
15
16 app_info
17 }
18}