pub struct Signer { /* private fields */ }
Expand description
A configured signer for generating RDS IAM authentication tokens.
The signer contains all the necessary configuration to generate authentication
tokens for connecting to an RDS instance. It can be created using the builder
pattern via SignerBuilder
.
Implementations§
Source§impl Signer
impl Signer
Sourcepub fn builder() -> SignerBuilder
pub fn builder() -> SignerBuilder
Creates a new SignerBuilder
for configuring a Signer instance.
Sourcepub async fn fetch_token(&self) -> Result<String, Error>
pub async fn fetch_token(&self) -> Result<String, Error>
Generates an authentication token for connecting to the RDS instance.
This method will use the configured AWS credentials to generate a signed authentication token that can be used to connect to the RDS instance. The token is valid for the duration specified in the configuration.
§Returns
Ok(String)
- The authentication tokenErr(Error)
- If token generation fails
§Errors
SignerError
- If signing the request failsParseError
- If URL parsing fails
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnwindSafe for Signer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.