pub struct BoundaryClient {
pub host: Url,
pub auth_method_id: String,
pub login_name: String,
pub password: String,
/* private fields */
}
Expand description
BoundaryClient is used to connect to the Boundary server The Default trait is implemented to cover the Boundary server in dev mode Otherwise you can configure the client prior to authentication using builder pattern methods
Fields§
§host: Url
§auth_method_id: String
§login_name: String
§password: String
Implementations§
Source§impl BoundaryClient
impl BoundaryClient
Sourcepub fn new<S>(host: S) -> Result<Self, BoundaryError>
pub fn new<S>(host: S) -> Result<Self, BoundaryError>
new()
takes in any String or &str that returns Ok() from Url::parse()
Need to configure other struct values before running authenticate()
against Boundary server
Sourcepub fn auth_method_id<'a, S>(&'a mut self, id: S) -> Self
pub fn auth_method_id<'a, S>(&'a mut self, id: S) -> Self
auth_method_id
configures the value passed to the Boundary auth method service
Sourcepub fn login_name<'a, S>(&'a mut self, login_name: S) -> Self
pub fn login_name<'a, S>(&'a mut self, login_name: S) -> Self
login_name
configures the login name used for connecting to the Boundary auth method service
Sourcepub fn password<'a, S>(&'a mut self, password: S) -> Self
pub fn password<'a, S>(&'a mut self, password: S) -> Self
password
configures the password used for connecting to the Boundary auth method service
Sourcepub async fn authenticate<'a>(&'a mut self) -> Result<Response, BoundaryError>
pub async fn authenticate<'a>(&'a mut self) -> Result<Response, BoundaryError>
authenticate
will connect to the Boundary server using the current struct values
Trait Implementations§
Source§impl Clone for BoundaryClient
impl Clone for BoundaryClient
Source§fn clone(&self) -> BoundaryClient
fn clone(&self) -> BoundaryClient
Returns a copy 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 BoundaryClient
impl Debug for BoundaryClient
Auto Trait Implementations§
impl Freeze for BoundaryClient
impl !RefUnwindSafe for BoundaryClient
impl Send for BoundaryClient
impl Sync for BoundaryClient
impl Unpin for BoundaryClient
impl !UnwindSafe for BoundaryClient
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