pub struct Key {
pub method: String,
pub encryption_key: Option<String>,
}Expand description
Encryption key for the session or media.
Note: This field is obsolete and MUST NOT be used. It is included only for legacy reasons See RFC 8866 Section 5.12 for more details.
Fields§
§method: StringEncryption method that is used.
encryption_key: Option<String>Encryption key or information to obtain the encryption key.
Implementations§
Source§impl Key
impl Key
pub fn new(method: KeyMethod) -> Self
Sourcepub fn with_encryption_key(
method: KeyMethod,
encryption_key: impl ToString,
) -> Self
pub fn with_encryption_key( method: KeyMethod, encryption_key: impl ToString, ) -> Self
Constructs a crate::Key and define its encryption_key.
Sourcepub fn try_parse_keymethod(&self) -> Result<KeyMethod, ParseEnumError>
pub fn try_parse_keymethod(&self) -> Result<KeyMethod, ParseEnumError>
Tries to parse the method String of self as KeyMethod
Sourcepub fn set_keymethod(&mut self, method: KeyMethod)
pub fn set_keymethod(&mut self, method: KeyMethod)
Sets the method String of self from the specified KeyMethod
Trait Implementations§
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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