use alloc::{vec, vec::Vec};
use bytes::Bytes;
#[derive(Debug)]
pub struct Groot2Message(pub Vec<Bytes>);
impl Groot2Message {
pub fn get(&self, index: usize) -> Option<&Bytes> {
self.0.get(index)
}
pub fn push_back(&mut self, bytes: Bytes) {
self.0.push(bytes);
}
}
impl From<Bytes> for Groot2Message {
fn from(bytes: Bytes) -> Self {
Self(vec![bytes])
}
}