pub struct AppendBlobClient { /* private fields */ }Implementations§
Source§impl AppendBlobClient
impl AppendBlobClient
Sourcepub fn new(
blob_url: Url,
credential: Option<Arc<dyn TokenCredential>>,
options: Option<AppendBlobClientOptions>,
) -> Result<Self>
pub fn new( blob_url: Url, credential: Option<Arc<dyn TokenCredential>>, options: Option<AppendBlobClientOptions>, ) -> Result<Self>
Creates a new AppendBlobClient from a blob URL.
§Arguments
blob_url- The full URL of the Append blob, for examplehttps://myaccount.blob.core.windows.net/mycontainer/myblob. The caller is responsible for percent-encoding the URL correctly; it will be used as-is.credential- An optional implementation ofTokenCredentialthat can provide an Entra ID token to use when authenticating.options- Optional configuration for the client.
Source§impl AppendBlobClient
impl AppendBlobClient
Sourcepub async fn append_block(
&self,
body: RequestContent<Bytes, NoFormat>,
content_length: u64,
options: Option<AppendBlobClientAppendBlockOptions<'_>>,
) -> Result<Response<AppendBlobClientAppendBlockResult, NoFormat>>
pub async fn append_block( &self, body: RequestContent<Bytes, NoFormat>, content_length: u64, options: Option<AppendBlobClientAppendBlockOptions<'_>>, ) -> Result<Response<AppendBlobClientAppendBlockResult, NoFormat>>
Uploads a new block of data to the end of an append blob.
§Arguments
body- The body of the request.content_length- The length of the request.options- Optional parameters for the request.
§Response Headers
The returned Response implements the AppendBlobClientAppendBlockResultHeaders trait, which provides
access to response headers. For example:
use azure_core::{Result, http::{Response, NoFormat}};
use azure_storage_blob::models::{AppendBlobClientAppendBlockResult, AppendBlobClientAppendBlockResultHeaders};
async fn example() -> Result<()> {
let response: Response<AppendBlobClientAppendBlockResult, NoFormat> = unimplemented!();
// Access response headers
if let Some(content_md5) = response.content_md5()? {
println!("content-md5: {:?}", content_md5);
}
if let Some(etag) = response.etag()? {
println!("etag: {:?}", etag);
}
if let Some(last_modified) = response.last_modified()? {
println!("last-modified: {:?}", last_modified);
}
Ok(())
}§Available headers
content_md5() - content-md5etag() - etaglast_modified() - last-modifiedblob_append_offset() - x-ms-blob-append-offsetblob_committed_block_count() - x-ms-blob-committed-block-countcontent_crc64() - x-ms-content-crc64encryption_key_sha256() - x-ms-encryption-key-sha256encryption_scope() - x-ms-encryption-scopeis_server_encrypted() - x-ms-request-server-encrypted
Sourcepub async fn append_block_from_url(
&self,
source_url: String,
content_length: u64,
options: Option<AppendBlobClientAppendBlockFromUrlOptions<'_>>,
) -> Result<Response<AppendBlobClientAppendBlockFromUrlResult, NoFormat>>
pub async fn append_block_from_url( &self, source_url: String, content_length: u64, options: Option<AppendBlobClientAppendBlockFromUrlOptions<'_>>, ) -> Result<Response<AppendBlobClientAppendBlockFromUrlResult, NoFormat>>
Uploads a new block of data from the specified URL to the end of an append blob.
§Arguments
source_url- Specifies the URL of the source.content_length- The length of the request.options- Optional parameters for the request.
§Response Headers
The returned Response implements the AppendBlobClientAppendBlockFromUrlResultHeaders trait, which provides
access to response headers. For example:
use azure_core::{Result, http::{Response, NoFormat}};
use azure_storage_blob::models::{AppendBlobClientAppendBlockFromUrlResult, AppendBlobClientAppendBlockFromUrlResultHeaders};
async fn example() -> Result<()> {
let response: Response<AppendBlobClientAppendBlockFromUrlResult, NoFormat> = unimplemented!();
// Access response headers
if let Some(content_md5) = response.content_md5()? {
println!("content-md5: {:?}", content_md5);
}
if let Some(etag) = response.etag()? {
println!("etag: {:?}", etag);
}
if let Some(last_modified) = response.last_modified()? {
println!("last-modified: {:?}", last_modified);
}
Ok(())
}§Available headers
content_md5() - content-md5etag() - etaglast_modified() - last-modifiedblob_append_offset() - x-ms-blob-append-offsetblob_committed_block_count() - x-ms-blob-committed-block-countcontent_crc64() - x-ms-content-crc64encryption_key_sha256() - x-ms-encryption-key-sha256encryption_scope() - x-ms-encryption-scopeis_server_encrypted() - x-ms-request-server-encrypted
Sourcepub async fn create(
&self,
options: Option<AppendBlobClientCreateOptions<'_>>,
) -> Result<Response<AppendBlobClientCreateResult, NoFormat>>
pub async fn create( &self, options: Option<AppendBlobClientCreateOptions<'_>>, ) -> Result<Response<AppendBlobClientCreateResult, NoFormat>>
Creates a new append blob.
§Arguments
options- Optional parameters for the request.
§Response Headers
The returned Response implements the AppendBlobClientCreateResultHeaders trait, which provides
access to response headers. For example:
use azure_core::{Result, http::{Response, NoFormat}};
use azure_storage_blob::models::{AppendBlobClientCreateResult, AppendBlobClientCreateResultHeaders};
async fn example() -> Result<()> {
let response: Response<AppendBlobClientCreateResult, NoFormat> = unimplemented!();
// Access response headers
if let Some(content_md5) = response.content_md5()? {
println!("content-md5: {:?}", content_md5);
}
if let Some(etag) = response.etag()? {
println!("etag: {:?}", etag);
}
if let Some(last_modified) = response.last_modified()? {
println!("last-modified: {:?}", last_modified);
}
Ok(())
}§Available headers
content_md5() - content-md5etag() - etaglast_modified() - last-modifiedencryption_key_sha256() - x-ms-encryption-key-sha256encryption_scope() - x-ms-encryption-scopeis_server_encrypted() - x-ms-request-server-encryptedversion_id() - x-ms-version-id
Sourcepub async fn seal(
&self,
options: Option<AppendBlobClientSealOptions<'_>>,
) -> Result<Response<AppendBlobClientSealResult, NoFormat>>
pub async fn seal( &self, options: Option<AppendBlobClientSealOptions<'_>>, ) -> Result<Response<AppendBlobClientSealResult, NoFormat>>
Seals the append blob to make it read-only.
§Arguments
options- Optional parameters for the request.
§Response Headers
The returned Response implements the AppendBlobClientSealResultHeaders trait, which provides
access to response headers. For example:
use azure_core::{Result, http::{Response, NoFormat}};
use azure_storage_blob::models::{AppendBlobClientSealResult, AppendBlobClientSealResultHeaders};
async fn example() -> Result<()> {
let response: Response<AppendBlobClientSealResult, NoFormat> = unimplemented!();
// Access response headers
if let Some(etag) = response.etag()? {
println!("etag: {:?}", etag);
}
if let Some(last_modified) = response.last_modified()? {
println!("last-modified: {:?}", last_modified);
}
if let Some(is_sealed) = response.is_sealed()? {
println!("x-ms-blob-sealed: {:?}", is_sealed);
}
Ok(())
}§Available headers
etag() - etaglast_modified() - last-modifiedis_sealed() - x-ms-blob-sealed