[][src]Struct boundary_api::BoundaryClient

pub struct BoundaryClient {
    pub host: Url,
    pub auth_method_id: String,
    pub login_name: String,
    pub password: String,
    // some fields omitted
}

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: Urlauth_method_id: Stringlogin_name: Stringpassword: String

Implementations

impl BoundaryClient[src]

pub fn new<S>(host: S) -> Result<Self, BoundaryError> where
    S: AsRef<str>, 
[src]

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

pub fn auth_method_id<'a, S>(&'a mut self, id: S) -> Self where
    S: Into<String>, 
[src]

auth_method_id configures the value passed to the Boundary auth method service

pub fn login_name<'a, S>(&'a mut self, login_name: S) -> Self where
    S: Into<String>, 
[src]

login_name configures the login name used for connecting to the Boundary auth method service

pub fn password<'a, S>(&'a mut self, password: S) -> Self where
    S: Into<String>, 
[src]

password configures the password used for connecting to the Boundary auth method service

pub async fn authenticate<'a>(&'a mut self) -> Result<Response, BoundaryError>[src]

authenticate will connect to the Boundary server using the current struct values

Trait Implementations

impl Clone for BoundaryClient[src]

impl Debug for BoundaryClient[src]

impl Default for BoundaryClient[src]

fn default() -> Self[src]

These default values correspond to the defaults returned by running Boundary in dev mode

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.