use crate::{
command::{self, Command, MAX_MSG_SIZE},
response::Response,
};
use serde::{Deserialize, Serialize};
pub(crate) const MAX_RAND_BYTES: usize = MAX_MSG_SIZE - 1 - 2;
#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct GetPseudoRandomCommand {
pub bytes: u16,
}
impl Command for GetPseudoRandomCommand {
type ResponseType = GetPseudoRandomResponse;
}
#[derive(Serialize, Deserialize, Debug)]
pub(crate) struct GetPseudoRandomResponse {
pub bytes: Vec<u8>,
}
impl Response for GetPseudoRandomResponse {
const COMMAND_CODE: command::Code = command::Code::GetPseudoRandom;
}