#[non_exhaustive]pub struct CryptoKeyVersionTemplate {
pub protection_level: ProtectionLevel,
pub algorithm: CryptoKeyVersionAlgorithm,
/* private fields */
}Expand description
A CryptoKeyVersionTemplate specifies the properties to use when creating a new CryptoKeyVersion, either manually with CreateCryptoKeyVersion or automatically as a result of auto-rotation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.protection_level: ProtectionLevelProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE.
algorithm: CryptoKeyVersionAlgorithmRequired. Algorithm to use when creating a CryptoKeyVersion based on this template.
For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and CryptoKey.purpose is ENCRYPT_DECRYPT.
Implementations§
Source§impl CryptoKeyVersionTemplate
impl CryptoKeyVersionTemplate
pub fn new() -> Self
Sourcepub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
pub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
Sets the value of protection_level.
Sourcepub fn set_algorithm<T: Into<CryptoKeyVersionAlgorithm>>(self, v: T) -> Self
pub fn set_algorithm<T: Into<CryptoKeyVersionAlgorithm>>(self, v: T) -> Self
Sets the value of algorithm.
Trait Implementations§
Source§impl Clone for CryptoKeyVersionTemplate
impl Clone for CryptoKeyVersionTemplate
Source§fn clone(&self) -> CryptoKeyVersionTemplate
fn clone(&self) -> CryptoKeyVersionTemplate
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 CryptoKeyVersionTemplate
impl Debug for CryptoKeyVersionTemplate
Source§impl Default for CryptoKeyVersionTemplate
impl Default for CryptoKeyVersionTemplate
Source§fn default() -> CryptoKeyVersionTemplate
fn default() -> CryptoKeyVersionTemplate
Returns the “default value” for a type. Read more
Source§impl Message for CryptoKeyVersionTemplate
impl Message for CryptoKeyVersionTemplate
Source§impl PartialEq for CryptoKeyVersionTemplate
impl PartialEq for CryptoKeyVersionTemplate
impl StructuralPartialEq for CryptoKeyVersionTemplate
Auto Trait Implementations§
impl Freeze for CryptoKeyVersionTemplate
impl RefUnwindSafe for CryptoKeyVersionTemplate
impl Send for CryptoKeyVersionTemplate
impl Sync for CryptoKeyVersionTemplate
impl Unpin for CryptoKeyVersionTemplate
impl UnwindSafe for CryptoKeyVersionTemplate
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