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