#[non_exhaustive]pub struct Encryption {
pub id: String,
pub drm_systems: Option<DrmSystems>,
pub encryption_mode: Option<EncryptionMode>,
pub secret_source: Option<SecretSource>,
/* private fields */
}
Expand description
Encryption settings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: String
Required. Identifier for this set of encryption options.
drm_systems: Option<DrmSystems>
Required. DRM system(s) to use; at least one must be specified. If a DRM system is omitted, it is considered disabled.
encryption_mode: Option<EncryptionMode>
Encryption mode can be either aes
or cenc
.
secret_source: Option<SecretSource>
Defines where content keys are stored.
Implementations§
Source§impl Encryption
impl Encryption
pub fn new() -> Self
Sourcepub fn set_drm_systems<T>(self, v: T) -> Selfwhere
T: Into<DrmSystems>,
pub fn set_drm_systems<T>(self, v: T) -> Selfwhere
T: Into<DrmSystems>,
Sets the value of drm_systems.
Sourcepub fn set_or_clear_drm_systems<T>(self, v: Option<T>) -> Selfwhere
T: Into<DrmSystems>,
pub fn set_or_clear_drm_systems<T>(self, v: Option<T>) -> Selfwhere
T: Into<DrmSystems>,
Sets or clears the value of drm_systems.
Sourcepub fn set_encryption_mode<T: Into<Option<EncryptionMode>>>(self, v: T) -> Self
pub fn set_encryption_mode<T: Into<Option<EncryptionMode>>>(self, v: T) -> Self
Sets the value of encryption_mode.
Note that all the setters affecting encryption_mode
are mutually
exclusive.
Sourcepub fn aes_128(&self) -> Option<&Box<Aes128Encryption>>
pub fn aes_128(&self) -> Option<&Box<Aes128Encryption>>
The value of encryption_mode
if it holds a Aes128
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_aes_128<T: Into<Box<Aes128Encryption>>>(self, v: T) -> Self
pub fn set_aes_128<T: Into<Box<Aes128Encryption>>>(self, v: T) -> Self
Sets the value of encryption_mode
to hold a Aes128
.
Note that all the setters affecting encryption_mode
are
mutually exclusive.
Sourcepub fn sample_aes(&self) -> Option<&Box<SampleAesEncryption>>
pub fn sample_aes(&self) -> Option<&Box<SampleAesEncryption>>
The value of encryption_mode
if it holds a SampleAes
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_sample_aes<T: Into<Box<SampleAesEncryption>>>(self, v: T) -> Self
pub fn set_sample_aes<T: Into<Box<SampleAesEncryption>>>(self, v: T) -> Self
Sets the value of encryption_mode
to hold a SampleAes
.
Note that all the setters affecting encryption_mode
are
mutually exclusive.
Sourcepub fn mpeg_cenc(&self) -> Option<&Box<MpegCommonEncryption>>
pub fn mpeg_cenc(&self) -> Option<&Box<MpegCommonEncryption>>
The value of encryption_mode
if it holds a MpegCenc
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_mpeg_cenc<T: Into<Box<MpegCommonEncryption>>>(self, v: T) -> Self
pub fn set_mpeg_cenc<T: Into<Box<MpegCommonEncryption>>>(self, v: T) -> Self
Sets the value of encryption_mode
to hold a MpegCenc
.
Note that all the setters affecting encryption_mode
are
mutually exclusive.
Sourcepub fn set_secret_source<T: Into<Option<SecretSource>>>(self, v: T) -> Self
pub fn set_secret_source<T: Into<Option<SecretSource>>>(self, v: T) -> Self
Sets the value of secret_source.
Note that all the setters affecting secret_source
are mutually
exclusive.
Sourcepub fn secret_manager_key_source(&self) -> Option<&Box<SecretManagerSource>>
pub fn secret_manager_key_source(&self) -> Option<&Box<SecretManagerSource>>
The value of secret_source
if it holds a SecretManagerKeySource
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_secret_manager_key_source<T: Into<Box<SecretManagerSource>>>(
self,
v: T,
) -> Self
pub fn set_secret_manager_key_source<T: Into<Box<SecretManagerSource>>>( self, v: T, ) -> Self
Sets the value of secret_source
to hold a SecretManagerKeySource
.
Note that all the setters affecting secret_source
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for Encryption
impl Clone for Encryption
Source§fn clone(&self) -> Encryption
fn clone(&self) -> Encryption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more