1#![no_std]
6#![doc = include_str!("../README.md")]
7extern crate alloc;
8mod bounded;
9mod contract;
10mod float;
11pub mod native;
12pub mod schema;
13mod shape;
14#[cfg(feature = "typescript")]
16pub mod typescript;
17pub use bounded::{Bytes, BytesRef, List, Text, TextRef};
18pub use contract::{
19 Method, RequestBytes, ResponseBytes, decode_request, decode_response, encode_request,
20 encode_request_into, encode_response, encode_response_into, encoded_request_len,
21 encoded_response_len,
22};
23pub use float::{FiniteF32, FiniteF64};
24pub use ic_wire_derive::Wire;
25pub use shape::{Limits, Shape, Wire};
26
27#[doc(hidden)]
29pub mod __private {
30 pub use serde;
31}
32
33#[derive(Clone, Copy, Debug, Eq, PartialEq)]
35pub enum Error {
36 Limit,
38 SchemaLimit,
40 Allocation,
42 Malformed,
44 Trailing,
46 Noncanonical,
48 Identity,
50}
51impl core::fmt::Display for Error {
52 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
53 write!(f, "wire {self:?}")
54 }
55}
56impl core::error::Error for Error {}