ic-asset 0.29.0

Library for storing files in an asset canister.
Documentation
use crate::error::compatibility::CompatibilityError;
use crate::error::upload_content::UploadContentError;
use ic_agent::AgentError;
use thiserror::Error;

/// Errors related to the sync process.
#[derive(Error, Debug)]
pub enum SyncError {
    /// Failed when querying the asset canister for its API version.
    #[error("Failed to query asset canister API version")]
    ApiVersionQueryFailed(#[source] AgentError),

    /// Failed when calling commit_batch
    #[error("Failed to commit batch")]
    CommitBatchFailed(#[source] AgentError),

    /// Failed when trying to work with an older asset canister.
    #[error(transparent)]
    Compatibility(#[from] CompatibilityError),

    /// Failed when uploading content for synchronization.
    #[error(transparent)]
    UploadContentFailed(#[from] UploadContentError),
}