#[non_exhaustive]pub struct CryptoProperties {
pub asset_type: CryptoAssetType,
pub oid: Option<String>,
pub algorithm_properties: Option<AlgorithmProperties>,
pub certificate_properties: Option<CertificateProperties>,
pub related_crypto_material_properties: Option<RelatedCryptoMaterialProperties>,
pub protocol_properties: Option<ProtocolProperties>,
}Expand description
Cryptographic properties for a component of type cryptographic-asset.
Mirrors the CycloneDX 1.6+ cryptoProperties object. Exactly one of
the four property sub-structs should be populated, matching asset_type.
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.asset_type: CryptoAssetTypeThe type of cryptographic asset.
oid: Option<String>Object Identifier (OID) for unambiguous algorithm identification.
algorithm_properties: Option<AlgorithmProperties>Properties specific to algorithm assets.
certificate_properties: Option<CertificateProperties>Properties specific to certificate assets.
Properties specific to key material assets.
protocol_properties: Option<ProtocolProperties>Properties specific to protocol assets.
Implementations§
Source§impl CryptoProperties
impl CryptoProperties
Sourcepub fn new(asset_type: CryptoAssetType) -> Self
pub fn new(asset_type: CryptoAssetType) -> Self
Create new crypto properties with the given asset type.
pub fn with_oid(self, oid: String) -> Self
pub fn with_algorithm_properties(self, props: AlgorithmProperties) -> Self
pub fn with_certificate_properties(self, props: CertificateProperties) -> Self
pub fn with_protocol_properties(self, props: ProtocolProperties) -> Self
Trait Implementations§
Source§impl Clone for CryptoProperties
impl Clone for CryptoProperties
Source§fn clone(&self) -> CryptoProperties
fn clone(&self) -> CryptoProperties
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 CryptoProperties
impl Debug for CryptoProperties
Source§impl<'de> Deserialize<'de> for CryptoProperties
impl<'de> Deserialize<'de> for CryptoProperties
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 PartialEq for CryptoProperties
impl PartialEq for CryptoProperties
Source§impl Serialize for CryptoProperties
impl Serialize for CryptoProperties
impl Eq for CryptoProperties
impl StructuralPartialEq for CryptoProperties
Auto Trait Implementations§
impl Freeze for CryptoProperties
impl RefUnwindSafe for CryptoProperties
impl Send for CryptoProperties
impl Sync for CryptoProperties
impl Unpin for CryptoProperties
impl UnsafeUnpin for CryptoProperties
impl UnwindSafe for CryptoProperties
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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