File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
sdk/storage_blobs/src/options Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
use azure_core:: AppendToUrlQuery ;
2
2
use bytes:: Bytes ;
3
3
4
+ /// Struct wrapping the bytes of a block blob block-id,
5
+ ///
6
+ /// A block id cannot exceed 64 bytes before encoding. In addition all block id's in a block list must be the same length.
7
+ /// Reference: https://learn.microsoft.com/en-us/rest/api/storageservices/put-block#uri-parameters
8
+ ///
4
9
#[ derive( Debug , Clone , PartialEq , Eq ) ]
5
10
pub struct BlockId ( Bytes ) ;
6
11
7
12
impl BlockId {
13
+ /// Returns a new block id,
14
+ ///
8
15
pub fn new ( block_id : impl Into < Bytes > ) -> Self {
9
16
Self ( block_id. into ( ) )
10
17
}
18
+
19
+ /// Returns clone of bytes,
20
+ ///
21
+ pub fn bytes ( & self ) -> Bytes {
22
+ self . 0 . clone ( )
23
+ }
11
24
}
12
25
13
26
impl AppendToUrlQuery for BlockId {
You can’t perform that action at this time.
0 commit comments