1pub mod access;
21pub mod api;
22pub mod bootstrap;
23#[doc(hidden)]
24pub mod dispatch;
25pub mod domain;
26pub mod dto;
27pub mod error;
28pub mod ids;
29pub mod log;
30pub mod perf;
31pub mod protocol;
32#[cfg(test)]
33pub mod test;
34
35pub(crate) mod config;
36pub(crate) mod infra;
37pub(crate) mod lifecycle;
38pub(crate) mod ops;
39pub(crate) mod storage;
40pub(crate) mod view;
41pub(crate) mod workflow;
42
43pub use {
44 ::canic_cdk as cdk,
45 ::canic_memory as memory,
46 ::canic_memory::{eager_init, eager_static, ic_memory, ic_memory_range},
47 ::canic_utils as utils,
48};
49
50pub(crate) use error::{InternalError, InternalErrorClass, InternalErrorOrigin};
51
52#[doc(hidden)]
55pub mod __reexports {
56 pub use ::ctor;
57}
58
59pub const CRATE_NAME: &str = env!("CARGO_PKG_NAME");
64pub const VERSION: &str = env!("CARGO_PKG_VERSION");
65pub const CANIC_MEMORY_MIN: u8 = storage::stable::CANIC_MEMORY_MIN;
66pub const CANIC_MEMORY_MAX: u8 = storage::stable::CANIC_MEMORY_MAX;
67
68#[cfg(test)]
69#[macro_export]
70macro_rules! assert_err_variant {
71 ($err:expr, $pat:pat $(if $guard:expr)? $(,)?) => {{
72 match $err {
73 $pat $(if $guard)? => {}
74 other => panic!("unexpected error variant: {other:?}"),
75 }
76 }};
77}