//! This code was AUTOGENERATED using the Codama library.
#[derive(Debug, Clone, Copy, PartialEq, borsh::BorshSerialize)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(transparent))]
pub struct OptionBool(pub bool);
impl borsh::BorshDeserialize for OptionBool {
fn deserialize_reader<R: std::io::Read>(reader: &mut R) -> std::io::Result<Self> {
let mut buf = [0u8; 1];
match reader.read(&mut buf)? {
0 => Ok(OptionBool(false)),
_ => Ok(OptionBool(buf[0] != 0)),
}
}
}