Struct ruma_events::room::EncryptedFile [−][src]
pub struct EncryptedFile {
pub url: MxcUri,
pub key: JsonWebKey,
pub iv: String,
pub hashes: BTreeMap<String, String>,
pub v: String,
}
Expand description
A file sent to a room with end-to-end encryption enabled.
To create an instance of this type, first create a EncryptedFileInit
and convert it via
EncryptedFile::from
/ .into()
.
Fields
url: MxcUri
The URL to the file.
key: JsonWebKey
A JSON Web Key object.
iv: String
The 128-bit unique counter block used by AES-CTR, encoded as unpadded base64.
hashes: BTreeMap<String, String>
A map from an algorithm name to a hash of the ciphertext, encoded as unpadded base64. Clients should support the SHA-256 hash, which uses the key sha256.
v: String
Version of the encrypted attachments protocol. Must be v2
.
Trait Implementations
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
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for EncryptedFile
impl Send for EncryptedFile
impl Sync for EncryptedFile
impl Unpin for EncryptedFile
impl UnwindSafe for EncryptedFile
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more