azure_storage_blobs/options/
mod.rs

1//! Various blob related request options
2
3mod access_tier;
4mod ba512_range;
5mod blob_cache_control;
6mod blob_content_disposition;
7mod blob_content_encoding;
8mod blob_content_language;
9mod blob_content_md5;
10mod blob_content_type;
11mod blob_expiry;
12mod blob_versioning;
13mod block_id;
14mod condition_append_position;
15mod condition_max_size;
16mod delete_snapshot_method;
17mod encryption_key;
18mod encryption_scope;
19mod hash;
20mod rehydrate_policy;
21mod tags;
22
23pub use access_tier::AccessTier;
24pub use ba512_range::BA512Range;
25pub use blob_cache_control::BlobCacheControl;
26pub use blob_content_disposition::BlobContentDisposition;
27pub use blob_content_encoding::BlobContentEncoding;
28pub use blob_content_language::BlobContentLanguage;
29pub use blob_content_md5::BlobContentMD5;
30pub use blob_content_type::BlobContentType;
31pub use blob_expiry::BlobExpiry;
32pub use blob_versioning::BlobVersioning;
33pub use block_id::BlockId;
34pub use condition_append_position::ConditionAppendPosition;
35pub use condition_max_size::ConditionMaxSize;
36pub use delete_snapshot_method::DeleteSnapshotsMethod;
37pub use encryption_key::CPKInfo;
38pub use encryption_scope::EncryptionScope;
39pub use hash::Hash;
40pub use rehydrate_policy::RehydratePriority;
41pub use tags::Tags;
42
43use std::str::FromStr;
44
45use azure_core::error::Error;
46use azure_core::headers::HeaderName;
47
48request_query!(
49    /// This type could also be a DateTime but the docs clearly states to treat is as opaque so we do not convert it in any way.
50    ///
51    ///See: <https://docs.microsoft.com/rest/api/storageservices/get-blob>"]
52    VersionId,
53    "versionid"
54);
55
56request_query!(
57    /// This type could also be a DateTime but the docs clearly states to treat is as opaque so we do not convert it in any way.
58    ///
59    /// See: <https://docs.microsoft.com/rest/api/storageservices/get-blob>"]
60    #[derive(PartialEq, Eq, Serialize, Deserialize)]
61    Snapshot,
62    "snapshot"
63);
64
65impl FromStr for Snapshot {
66    type Err = Error;
67
68    fn from_str(s: &str) -> Result<Self, Self::Err> {
69        Ok(Self::new(s.to_string()))
70    }
71}
72
73pub const SNAPSHOT: HeaderName = HeaderName::from_static("x-ms-snapshot");