b3_utils 0.13.1

Utility functions for building on the Internet Computer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use candid::CandidType;
use serde::Deserialize;

#[derive(CandidType, Clone, Deserialize, Debug, PartialEq)]
pub enum ManagementError {
    CallError(String, String),
}

#[rustfmt::skip]
impl std::fmt::Display for ManagementError {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            ManagementError::CallError(method, msg) => write!(f, "Error calling method {}: {}", method, msg),
        }
    }
}