pub struct KeyReference {
pub provider: String,
pub key_id: String,
pub key_alias: Option<String>,
pub purpose: KeyPurpose,
pub created_at: i64,
}Expand description
Immutable reference to a key in KMS.
Fields§
§provider: StringProvider identifier (e.g., ‘vault’, ‘aws’, ‘gcp’)
key_id: StringProvider-specific key identifier
key_alias: Option<String>Human-readable alias (optional)
purpose: KeyPurposeIntended use of the key
created_at: i64When the key was created (Unix timestamp)
Implementations§
Source§impl KeyReference
impl KeyReference
Sourcepub const fn new(
provider: String,
key_id: String,
purpose: KeyPurpose,
created_at: i64,
) -> Self
pub const fn new( provider: String, key_id: String, purpose: KeyPurpose, created_at: i64, ) -> Self
Create a new key reference.
Sourcepub fn with_alias(self, alias: String) -> Self
pub fn with_alias(self, alias: String) -> Self
Set the key alias.
Sourcepub fn qualified_id(&self) -> String
pub fn qualified_id(&self) -> String
Get the fully qualified key identifier.
Trait Implementations§
Source§impl Clone for KeyReference
impl Clone for KeyReference
Source§fn clone(&self) -> KeyReference
fn clone(&self) -> KeyReference
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyReference
impl Debug for KeyReference
Source§impl<'de> Deserialize<'de> for KeyReference
impl<'de> Deserialize<'de> for KeyReference
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KeyReference
impl RefUnwindSafe for KeyReference
impl Send for KeyReference
impl Sync for KeyReference
impl Unpin for KeyReference
impl UnsafeUnpin for KeyReference
impl UnwindSafe for KeyReference
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more