Docs.rs
ic-canister-kit-1.1.4
ic-canister-kit 1.1.4
Permalink
Docs.rs crate page
Apache-2.0
Links
Repository
crates.io
Source
Owners
lazyanubis
Dependencies
base32 ^0.5.1
normal
optional
candid ^0.10
normal
optional
ciborium ^0.2
normal
optional
crc32fast ^1.5.0
normal
optional
hex ^0.4
normal
optional
ic-cdk ^0.18
normal
optional
ic-cdk-timers ^0.12.2
normal
optional
ic-ledger-types ^0.15
normal
optional
ic-management-canister-types ^0.4.1
normal
optional
ic-stable-structures ^0.7
normal
optional
icrc-ledger-types ^0.1
normal
optional
serde ^1.0
normal
optional
serde_json ^1.0
normal
optional
sha2 ^0.10.9
normal
optional
Versions
100%
of the crate is documented
Platform
i686-unknown-linux-gnu
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Crate ic_canister_kit
ic_
canister_
kit
1.1.4
All Items
Sections
ic-canister-kit
合约错误处理
Crate Items
Modules
Crate
ic_
canister_
kit
Copy item path
Source
Expand description
§
ic-canister-kit
ic-canister-kit
§
合约错误处理
assert!:通常用于调试和确保程序内部的逻辑正确性。例如,检查函数的输入参数是否符合预期,或者检查某个中间计算结果是否在合理范围内。
ic_cdk::trap:更侧重于处理一些严重的错误情况,比如在合约无法继续执行时使用。它会直接终止合约执行,并向调用者返回一个错误信息。
Modules
§
bitcoin
比特币相关
candid
candid 解析
canister
罐子相关
common
通用工具
ecdsa
签名相关
functions
特殊功能
http
http 请求相关
identity
身份相关
number
数字相关
stable
基本的持久化
times
时间相关 时间相关
token
代币相关
types
所有类型