pub struct ClientSettings {
pub identity_url: String,
pub api_url: String,
pub user_agent: String,
pub device_type: DeviceType,
pub device_identifier: Option<String>,
pub bitwarden_client_version: Option<String>,
pub bitwarden_package_type: Option<String>,
}Expand description
Basic client behavior settings. These settings specify the various targets and behavior of the Bitwarden Client. They are optional and uneditable once the client is initialized.
Defaults to
let settings = ClientSettings {
identity_url: "https://identity.bitwarden.com".to_string(),
api_url: "https://api.bitwarden.com".to_string(),
user_agent: "Bitwarden Rust-SDK".to_string(),
device_type: DeviceType::SDK,
bitwarden_client_version: None,
bitwarden_package_type: None,
device_identifier: None,
};
let default = ClientSettings::default();Fields§
§identity_url: StringThe identity url of the targeted Bitwarden instance. Defaults to https://identity.bitwarden.com
api_url: StringThe api url of the targeted Bitwarden instance. Defaults to https://api.bitwarden.com
user_agent: StringThe user_agent to sent to Bitwarden. Defaults to Bitwarden Rust-SDK
device_type: DeviceTypeDevice type to send to Bitwarden. Defaults to SDK
device_identifier: Option<String>Device identifier to send to Bitwarden. Optional for now in transition period.
bitwarden_client_version: Option<String>Bitwarden Client Version to send to Bitwarden. Optional for now in transition period.
bitwarden_package_type: Option<String>Bitwarden Package Type to send to Bitwarden. We should evaluate this field to see if it should be optional later.
Trait Implementations§
Source§impl Debug for ClientSettings
impl Debug for ClientSettings
Source§impl Default for ClientSettings
impl Default for ClientSettings
Source§impl<'de> Deserialize<'de> for ClientSettingswhere
ClientSettings: Default,
impl<'de> Deserialize<'de> for ClientSettingswhere
ClientSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ClientSettings
impl JsonSchema for ClientSettings
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ClientSettings
impl RefUnwindSafe for ClientSettings
impl Send for ClientSettings
impl Sync for ClientSettings
impl Unpin for ClientSettings
impl UnwindSafe for ClientSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more