pub enum BmcCredentials {
UsernamePassword {
username: String,
password: Option<String>,
},
Token {
token: String,
},
}Expand description
Credentials used to access the BMC.
Security notes:
Debug/Displayredact secrets by design.- Prefer short-lived instances and avoid logging credentials.
Variants§
UsernamePassword
Use HTTP Basic authentication with username and password.
Token
Use Redfish session token authentication.
Implementations§
Source§impl BmcCredentials
impl BmcCredentials
Sourcepub const fn username_password(
username: String,
password: Option<String>,
) -> BmcCredentials
pub const fn username_password( username: String, password: Option<String>, ) -> BmcCredentials
Create username/password credentials.
Sourcepub const fn token(token: String) -> BmcCredentials
pub const fn token(token: String) -> BmcCredentials
Create token credentials.
Sourcepub const fn new(username: String, password: String) -> BmcCredentials
pub const fn new(username: String, password: String) -> BmcCredentials
Create new username/password credentials.
Trait Implementations§
Source§impl Clone for BmcCredentials
impl Clone for BmcCredentials
Source§fn clone(&self) -> BmcCredentials
fn clone(&self) -> BmcCredentials
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 BmcCredentials
impl Debug for BmcCredentials
Auto Trait Implementations§
impl Freeze for BmcCredentials
impl RefUnwindSafe for BmcCredentials
impl Send for BmcCredentials
impl Sync for BmcCredentials
impl Unpin for BmcCredentials
impl UnsafeUnpin for BmcCredentials
impl UnwindSafe for BmcCredentials
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.