pub enum BucketCredential {
Hmac {
access_key: String,
secret_key: String,
},
ApiKey(String),
}Expand description
A parsed credential for an S3/COS bucket.
Credentials are returned by the optional bucket_creds_fetcher Python
callback in one of several formats:
- A JSON object with
access_keyandsecret_key→BucketCredential::Hmac - A JSON object with
api_keyorapikey→BucketCredential::ApiKey - Any other plain string → treated as a raw API key (
BucketCredential::ApiKey)
Variants§
Hmac
AWS-style HMAC credentials (SigV4).
ApiKey(String)
IBM COS API key (exchanged for an IAM bearer token before forwarding).
Implementations§
Source§impl BucketCredential
impl BucketCredential
Sourcepub fn parse(raw: &str) -> Self
pub fn parse(raw: &str) -> Self
Parse a raw credential string into a BucketCredential.
Tries JSON first. Recognises access_key/secret_key (HMAC) and
api_key/apikey (IBM API key). Falls back to treating the entire
input as a plain API-key string.
Auto Trait Implementations§
impl Freeze for BucketCredential
impl RefUnwindSafe for BucketCredential
impl Send for BucketCredential
impl Sync for BucketCredential
impl Unpin for BucketCredential
impl UnsafeUnpin for BucketCredential
impl UnwindSafe for BucketCredential
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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