#[non_exhaustive]pub struct BasicAuthentication {
pub username: String,
pub password: Option<Password>,
/* private fields */
}Expand description
Basic authentication with username and password.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.username: StringRequired. The username to authenticate as.
password: Option<Password>The password to authenticate as.
Implementations§
Source§impl BasicAuthentication
impl BasicAuthentication
pub fn new() -> Self
Sourcepub fn set_username<T: Into<String>>(self, v: T) -> Self
pub fn set_username<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_password<T: Into<Option<Password>>>(self, v: T) -> Self
pub fn set_password<T: Into<Option<Password>>>(self, v: T) -> Self
Sets the value of password.
Note that all the setters affecting password are mutually
exclusive.
§Example
ⓘ
use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::basic_authentication::Password;
let x = BasicAuthentication::new().set_password(Some(Password::PasswordSecretVersion("example".to_string())));Sourcepub fn password_secret_version(&self) -> Option<&String>
pub fn password_secret_version(&self) -> Option<&String>
The value of password
if it holds a PasswordSecretVersion, None if the field is not set or
holds a different branch.
Sourcepub fn set_password_secret_version<T: Into<String>>(self, v: T) -> Self
pub fn set_password_secret_version<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for BasicAuthentication
impl Clone for BasicAuthentication
Source§fn clone(&self) -> BasicAuthentication
fn clone(&self) -> BasicAuthentication
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BasicAuthentication
impl Debug for BasicAuthentication
Source§impl Default for BasicAuthentication
impl Default for BasicAuthentication
Source§fn default() -> BasicAuthentication
fn default() -> BasicAuthentication
Returns the “default value” for a type. Read more
Source§impl Message for BasicAuthentication
impl Message for BasicAuthentication
Source§impl PartialEq for BasicAuthentication
impl PartialEq for BasicAuthentication
impl StructuralPartialEq for BasicAuthentication
Auto Trait Implementations§
impl Freeze for BasicAuthentication
impl RefUnwindSafe for BasicAuthentication
impl Send for BasicAuthentication
impl Sync for BasicAuthentication
impl Unpin for BasicAuthentication
impl UnsafeUnpin for BasicAuthentication
impl UnwindSafe for BasicAuthentication
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