pub struct KeyAccess {
pub access_type: String,
pub url: String,
pub kid: Option<String>,
pub protocol: String,
pub wrapped_key: String,
pub policy_binding: PolicyBinding,
pub encrypted_metadata: Option<String>,
pub schema_version: Option<String>,
pub ephemeral_public_key: Option<String>,
}Expand description
Key access object in manifest
Fields§
§access_type: String§url: String§kid: Option<String>§protocol: String§wrapped_key: String§policy_binding: PolicyBinding§encrypted_metadata: Option<String>§schema_version: Option<String>§ephemeral_public_key: Option<String>Ephemeral public key for EC-wrapped keys (PEM format)
Implementations§
Source§impl KeyAccess
impl KeyAccess
Sourcepub fn new(url: String) -> Self
pub fn new(url: String) -> Self
Creates a new KeyAccess object with default values (RSA-wrapped)
Sourcepub fn new_ec_wrapped(url: String) -> Self
pub fn new_ec_wrapped(url: String) -> Self
Creates a new KeyAccess object for EC-wrapped keys
Sourcepub fn is_ec_wrapped(&self) -> bool
pub fn is_ec_wrapped(&self) -> bool
Check if this key access uses EC wrapping
Sourcepub fn is_rsa_wrapped(&self) -> bool
pub fn is_rsa_wrapped(&self) -> bool
Check if this key access uses RSA wrapping
Sourcepub fn set_ephemeral_public_key(&mut self, pem: String)
pub fn set_ephemeral_public_key(&mut self, pem: String)
Set the ephemeral public key (for EC-wrapped keys)
Source§impl KeyAccess
impl KeyAccess
Sourcepub fn set_encrypted_metadata(&mut self, metadata: &str)
pub fn set_encrypted_metadata(&mut self, metadata: &str)
Set encrypted metadata
Sourcepub fn clear_encrypted_metadata(&mut self)
pub fn clear_encrypted_metadata(&mut self)
Clear encrypted metadata
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyAccess
impl<'de> Deserialize<'de> for KeyAccess
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
Source§impl From<&KeyAccess> for KeyAccessObject
impl From<&KeyAccess> for KeyAccessObject
Source§impl From<&KeyAccessObject> for KeyAccess
impl From<&KeyAccessObject> for KeyAccess
Source§fn from(kao: &KeyAccessObject) -> Self
fn from(kao: &KeyAccessObject) -> Self
Converts to this type from the input type.
Source§impl From<KeyAccess> for KeyAccessObject
impl From<KeyAccess> for KeyAccessObject
Source§impl From<KeyAccessObject> for KeyAccess
impl From<KeyAccessObject> for KeyAccess
Source§fn from(kao: KeyAccessObject) -> Self
fn from(kao: KeyAccessObject) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KeyAccess
impl RefUnwindSafe for KeyAccess
impl Send for KeyAccess
impl Sync for KeyAccess
impl Unpin for KeyAccess
impl UnsafeUnpin for KeyAccess
impl UnwindSafe for KeyAccess
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