pub struct VaultClient {
pub http: Client,
pub middle: EndpointMiddleware,
pub settings: VaultClientSettings,
}
Expand description
A client which can be used to execute calls against a Vault server.
A vault client is configured using VaultClientSettings and will automatically configure a backing instance of a HTTPClient which is used for executing Endpoints.
Fields§
§http: Client
§middle: EndpointMiddleware
§settings: VaultClientSettings
Implementations§
source§impl VaultClient
impl VaultClient
sourcepub fn new(settings: VaultClientSettings) -> Result<VaultClient, ClientError>
pub fn new(settings: VaultClientSettings) -> Result<VaultClient, ClientError>
Creates a new VaultClient using the given VaultClientSettings.
Trait Implementations§
source§impl Client for VaultClient
impl Client for VaultClient
source§fn http(&self) -> &HTTPClient
fn http(&self) -> &HTTPClient
Returns the underlying HTTP client being used for API calls
source§fn middle(&self) -> &EndpointMiddleware
fn middle(&self) -> &EndpointMiddleware
Returns the middleware to be used when executing API calls
source§fn settings(&self) -> &VaultClientSettings
fn settings(&self) -> &VaultClientSettings
Returns the settings used to configure this client
source§fn lookup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<LookupTokenResponse, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<LookupTokenResponse, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Looks up the current token being used by this client
source§fn renew<'life0, 'life1, 'async_trait>(
&'life0 self,
increment: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AuthInfo, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn renew<'life0, 'life1, 'async_trait>(
&'life0 self,
increment: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<AuthInfo, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Renews the current token being used by this client
source§fn revoke<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn revoke<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Revokes the current token being used by this client
source§fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServerStatus, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServerStatus, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the status of the configured Vault server
Auto Trait Implementations§
impl Freeze for VaultClient
impl !RefUnwindSafe for VaultClient
impl Send for VaultClient
impl Sync for VaultClient
impl Unpin for VaultClient
impl !UnwindSafe for VaultClient
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