Skip to main content

azure_storage_blob/models/
upload_result.rs

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4use azure_core::{
5    fmt::SafeDebug,
6    http::{Etag, RawResponse},
7};
8use time::OffsetDateTime;
9
10/// Result of a `BlockBlobClient::upload()` or `BlobClient::upload()` operation.
11#[derive(SafeDebug)]
12pub struct BlockBlobClientUploadResult {
13    /// The blob's ETag.
14    pub etag: Option<Etag>,
15
16    /// The date/time the blob was last modified.
17    pub last_modified: Option<OffsetDateTime>,
18
19    /// The MD5 hash of the blob content, if present.
20    pub content_md5: Option<Vec<u8>>,
21
22    /// The CRC64 hash of the blob content, if present.
23    pub content_crc64: Option<Vec<u8>>,
24
25    /// The SHA-256 hash of the encryption key used to encrypt the blob, if any.
26    pub encryption_key_sha256: Option<String>,
27
28    /// The encryption scope used to encrypt the blob, if any.
29    pub encryption_scope: Option<String>,
30
31    /// Whether the blob was successfully encrypted server-side.
32    pub is_server_encrypted: Option<bool>,
33
34    /// The version ID of the blob, if versioning is enabled on the storage account.
35    pub version_id: Option<String>,
36
37    /// The raw HTTP response.
38    pub raw_response: RawResponse,
39}