canic-core 0.26.5

Canic — a canister orchestration and management toolkit for the Internet Computer
Documentation
pub mod bootstrap;
pub mod env;
pub mod log;
pub mod memory;
pub mod metrics;
pub mod ready;
pub mod timer;

use crate::{InternalError, ops::OpsError};
use thiserror::Error as ThisError;

///
/// RuntimeOpsError
///

#[derive(Debug, ThisError)]
pub enum RuntimeOpsError {
    #[error(transparent)]
    EnvOps(#[from] env::EnvOpsError),

    #[error(transparent)]
    LogOps(#[from] log::LogOpsError),

    #[error(transparent)]
    MemoryRegistryOps(#[from] memory::MemoryRegistryOpsError),
}

impl From<RuntimeOpsError> for InternalError {
    fn from(err: RuntimeOpsError) -> Self {
        OpsError::from(err).into()
    }
}