[−][src]Struct vault_rs::Client
Vault API Client
Methods
impl Client
[src]
pub fn new<S1, S2, S3>(
vault_address: Option<S1>,
vault_token: Option<S2>,
root_ca: Option<S3>,
revoke_self_on_drop: bool
) -> Result<Self, Error> where
S1: AsRef<str>,
S2: AsRef<str>,
S3: AsRef<str>,
[src]
vault_address: Option<S1>,
vault_token: Option<S2>,
root_ca: Option<S3>,
revoke_self_on_drop: bool
) -> Result<Self, Error> where
S1: AsRef<str>,
S2: AsRef<str>,
S3: AsRef<str>,
Create a new Vault Client.
You can optionally provide a reqwest::Client
if you have specific needs like custom root
CA certificate or require client authentication
pub fn from_environment<S1, S2, S3>(
address: Option<S1>,
token: Option<S2>,
ca_cert: Option<S3>
) -> Result<Self, Error> where
S1: AsRef<str>,
S2: AsRef<str>,
S3: AsRef<str>,
[src]
address: Option<S1>,
token: Option<S2>,
ca_cert: Option<S3>
) -> Result<Self, Error> where
S1: AsRef<str>,
S2: AsRef<str>,
S3: AsRef<str>,
Create a client from environment variables. You can provide alternative sources of the parameters with the optional arguments
The vnrionment variables are:
VAULT_ADDR
: Vault AddressVAULT_TOKEN
: Vault TokenVAULT_CACERT
: Path to the CA Certificate for Vault
pub fn address(&self) -> &str
[src]
Returns the Vault address
pub async fn revoke_self<'_>(&'_ self) -> Result<(), Error>
[src]
Revoke the Vault token itself
If successful, the Vault Token can no longer be used
Trait Implementations
impl Clone for Client
[src]
impl Debug for Client
[src]
impl Drop for Client
[src]
impl Vault for Client
[src]
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
method: Method
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
method: Method
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn read_with_query<'life0, 'life1, 'life2, 'async_trait, T: Serialize + Send + Sync + ?Sized>(
&'life0 self,
path: &'life1 str,
method: Method,
query: &'life2 T
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
method: Method,
query: &'life2 T
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait, T: Serialize + Send + Sync>(
&'life0 self,
path: &'life1 str,
payload: &'life2 T,
method: Method,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
payload: &'life2 T,
method: Method,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn get_with_query<'life0, 'life1, 'life2, 'async_trait, T: Serialize + Send + Sync + ?Sized>(
&'life0 self,
path: &'life1 str,
query: &'life2 T
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
query: &'life2 T
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn post<'life0, 'life1, 'life2, 'async_trait, T: Serialize + Send + Sync>(
&'life0 self,
path: &'life1 str,
payload: &'life2 T,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
payload: &'life2 T,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
fn put<'life0, 'life1, 'life2, 'async_trait, T: Serialize + Send + Sync>(
&'life0 self,
path: &'life1 str,
payload: &'life2 T,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
payload: &'life2 T,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
T: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
response_expected: bool
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Aws for T where
T: Vault + Send + Sync,
[src]
T: Vault + Send + Sync,
fn configure_root<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 RootCredentials
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 RootCredentials
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn rotate_root<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn configure_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 Lease
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 Lease
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn read_lease<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Lease, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Lease, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn create_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 Role
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 Role
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn read_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Role, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Role, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn list_roles<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn delete_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn generate_credentials<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 str,
&'life3 CredentialsRequest
) -> Pin<Box<dyn Future<Output = Result<LeasedData<Credentials>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 str,
&'life3 CredentialsRequest
) -> Pin<Box<dyn Future<Output = Result<LeasedData<Credentials>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: 'async_trait,
fn update_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
role: &'life2 Role
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
[src]
&'life0 self,
path: &'life1 str,
role: &'life2 Role
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Mounts for T where
T: Vault + Send + Sync,
[src]
T: Vault + Send + Sync,
fn list<'life0, 'async_trait>(
&'life0 Self
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecretEngine, RandomState>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecretEngine, RandomState>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
T: 'async_trait,
fn enable<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 SecretEngine
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 SecretEngine
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn disable<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<SecretsEngineConfig, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<SecretsEngineConfig, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn tune<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 SecretsEngineTune
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 SecretsEngineTune
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> Transit for T where
T: Vault + Send + Sync,
[src]
T: Vault + Send + Sync,
fn create_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 CreateKey
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 CreateKey
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn read_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Key, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Key, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn list_keys<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn delete_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 str
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn configure_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 Self,
&'life1 str,
&'life2 str,
&'life3 ConfigureKey
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: 'async_trait,
[src]
&'life0 Self,
&'life1 str,
&'life2 str,
&'life3 ConfigureKey
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
T: 'async_trait,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,