use ic_wire::Limits;
use serde::{Deserialize, Serialize};
pub const REQUEST: Limits = Limits {
bytes: 128,
allocation: 4096,
nodes: 128,
depth: 8,
};
pub const RESPONSE: Limits = REQUEST;
pub const INIT_ID: u64 = 0x4d45_4d51_0000_0001;
pub const UPGRADE_ID: u64 = 0x4d45_4d51_0000_0002;
pub const SNAPSHOT_ID: u64 = 0x4d45_4d51_0000_0003;
pub const IO_ID: u64 = 0x4d45_4d51_0000_0004;
pub const COMPOSITION_ID: u64 = 0x4d45_4d51_0000_0005;
pub const METADATA_FAULT_ID: u64 = 0x4d45_4d51_0000_0006;
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct Snapshot {
pub generation: u64,
pub markers: [u8; 2],
pub physical_pages: u64,
pub rows_pages: u64,
}
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct IoRequest {
pub operation: u8,
pub count: u8,
pub offset: u64,
}
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct IoReply {
pub bytes: [u8; 2],
pub instructions: u64,
}