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 fn new(
provider: String,
key_id: String,
purpose: KeyPurpose,
created_at: i64,
) -> Self
pub 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