#[derive(Clone, Debug, Default, Ord, PartialOrd, Eq, PartialEq)]
pub struct Request {
pub op: Vec<u8>,
pub c: u128,
pub s: u128,
pub v: usize,
}
#[derive(Clone, Debug, Default, Ord, PartialOrd, Eq, PartialEq)]
pub struct Reply {
pub v: usize,
pub s: u128,
pub x: Vec<u8>,
}
#[derive(Clone, Debug, Default, Ord, PartialOrd, Eq, PartialEq)]
pub struct Prepare {
pub v: usize,
pub n: usize,
pub m: Request,
}
#[derive(Clone, Debug, Default, Ord, PartialOrd, Eq, PartialEq)]
pub struct PrepareOk {
pub v: usize,
pub n: usize,
pub i: usize
}
#[derive(Clone, Debug, Default, Ord, PartialOrd, Eq, PartialEq)]
pub struct Commit {
pub v: usize,
pub n: usize,
}
#[derive(Clone, Debug, Ord, PartialOrd, Eq, PartialEq)]
pub enum Message {
Request(Request),
Prepare(Prepare),
PrepareOk(PrepareOk),
Reply(Reply),
Commit(Commit)
}