Struct tink_awskms::AwsClient
source · [−]pub struct AwsClient { /* private fields */ }
Expand description
AwsClient
represents a client that connects to the AWS KMS backend.
Implementations
sourceimpl AwsClient
impl AwsClient
sourcepub fn new(uri_prefix: &str) -> Result<AwsClient, TinkError>
pub fn new(uri_prefix: &str) -> Result<AwsClient, TinkError>
Return a new AWS KMS client which will use default credentials to handle keys with
uri_prefix
prefix. uri_prefix
must have the following format:
aws-kms://arn:<partition>:kms:<region>:[:path]
See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.
sourcepub fn new_with_credentials(
uri_prefix: &str,
credential_path: &Path
) -> Result<AwsClient, TinkError>
pub fn new_with_credentials(
uri_prefix: &str,
credential_path: &Path
) -> Result<AwsClient, TinkError>
Return a new AWS KMS client which will use given credentials to handle keys with
uri_prefix
prefix. uri_prefix
must have the following format:
aws-kms://arn:<partition>:kms:<region>:[:path]
See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.
sourcepub fn new_with_kms(
uri_prefix: &str,
kms: KmsClient
) -> Result<AwsClient, TinkError>
pub fn new_with_kms(
uri_prefix: &str,
kms: KmsClient
) -> Result<AwsClient, TinkError>
Return a new AWS KMS client with user created KMS client. Client is responsible for keeping
the region consistency between key URI and KMS client. uri_prefix
must have the
following format: aws-kms://arn:<partition>:kms:<region>:[:path]
See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.
Trait Implementations
sourceimpl KmsClient for AwsClient
impl KmsClient for AwsClient
Auto Trait Implementations
impl !RefUnwindSafe for AwsClient
impl Send for AwsClient
impl Sync for AwsClient
impl Unpin for AwsClient
impl !UnwindSafe for AwsClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more