ic-asset 0.28.0

Library for storing files in an asset canister.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::error::fs::NoParentPathError;
use std::path::PathBuf;
use thiserror::Error;

/// Errors related to getting asset configuration.
#[derive(Error, Debug)]
pub enum GetAssetConfigError {
    /// An asset exists, but it does not have a configuration.
    #[error("No configuration found for asset '{0}'")]
    AssetConfigNotFound(PathBuf),

    /// The path to an asset was invalid.
    #[error("invalid asset path")]
    InvalidPath(#[from] NoParentPathError),
}