Struct ClientSettings
pub struct ClientSettings {
pub identity_url: String,
pub api_url: String,
pub user_agent: String,
pub device_type: DeviceType,
}
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,
};
let default = ClientSettings::default();
Fields§
§identity_url: String
The identity url of the targeted Bitwarden instance. Defaults to https://identity.bitwarden.com
api_url: String
The api url of the targeted Bitwarden instance. Defaults to https://api.bitwarden.com
user_agent: String
The user_agent to sent to Bitwarden. Defaults to Bitwarden Rust-SDK
device_type: DeviceType
Device type to send to Bitwarden. Defaults to SDK
Trait Implementations§
§impl Debug for ClientSettings
impl Debug for ClientSettings
§impl Default for ClientSettings
impl Default for ClientSettings
§fn default() -> ClientSettings
fn default() -> ClientSettings
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for ClientSettingswhere
ClientSettings: Default,
impl<'de> Deserialize<'de> for ClientSettingswhere
ClientSettings: Default,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl JsonSchema for ClientSettings
impl JsonSchema for ClientSettings
§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read more§impl Serialize for ClientSettings
impl Serialize for ClientSettings
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto 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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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