#[non_exhaustive]pub struct BearerTokenAuthentication {
pub token: Option<Token>,
/* private fields */
}Expand description
Bearer token authentication with a token.
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.token: Option<Token>The token to authenticate as.
Implementations§
Source§impl BearerTokenAuthentication
impl BearerTokenAuthentication
pub fn new() -> Self
Sourcepub fn set_token<T: Into<Option<Token>>>(self, v: T) -> Self
pub fn set_token<T: Into<Option<Token>>>(self, v: T) -> Self
Sets the value of token.
Note that all the setters affecting token are mutually
exclusive.
§Example
ⓘ
use google_cloud_developerconnect_v1::model::generic_http_endpoint_config::bearer_token_authentication::Token;
let x = BearerTokenAuthentication::new().set_token(Some(Token::TokenSecretVersion("example".to_string())));Sourcepub fn token_secret_version(&self) -> Option<&String>
pub fn token_secret_version(&self) -> Option<&String>
The value of token
if it holds a TokenSecretVersion, None if the field is not set or
holds a different branch.
Sourcepub fn set_token_secret_version<T: Into<String>>(self, v: T) -> Self
pub fn set_token_secret_version<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for BearerTokenAuthentication
impl Clone for BearerTokenAuthentication
Source§fn clone(&self) -> BearerTokenAuthentication
fn clone(&self) -> BearerTokenAuthentication
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 BearerTokenAuthentication
impl Debug for BearerTokenAuthentication
Source§impl Default for BearerTokenAuthentication
impl Default for BearerTokenAuthentication
Source§fn default() -> BearerTokenAuthentication
fn default() -> BearerTokenAuthentication
Returns the “default value” for a type. Read more
Source§impl Message for BearerTokenAuthentication
impl Message for BearerTokenAuthentication
impl StructuralPartialEq for BearerTokenAuthentication
Auto Trait Implementations§
impl Freeze for BearerTokenAuthentication
impl RefUnwindSafe for BearerTokenAuthentication
impl Send for BearerTokenAuthentication
impl Sync for BearerTokenAuthentication
impl Unpin for BearerTokenAuthentication
impl UnsafeUnpin for BearerTokenAuthentication
impl UnwindSafe for BearerTokenAuthentication
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