ic-asset 0.29.0

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

/// Errors related to preparing synchronization operations for a proposal.
#[derive(Error, Debug)]
pub enum PrepareSyncForProposalError {
    /// Failed when querying the asset canister for its API version.
    #[error("Failed to query asset canister API version")]
    ApiVersionQueryFailed(#[source] AgentError),

    /// Failed while requesting that the asset canister compute evidence.
    #[error("Failed to compute evidence")]
    ComputeEvidence(#[source] AgentError),

    /// Failed while calling propose_commit_batch.
    #[error("Failed to propose batch to commit")]
    ProposeCommitBatch(#[source] AgentError),

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