use std::fmt;
use crate::global::flags::Flags;
#[derive(Debug, Clone)]
pub struct Resource {
pub data: Box<[u8]>,
pub flags: Flags,
pub content_version: u8,
pub verified: bool,
}
impl fmt::Display for Resource {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"[Resource] size: {size} bytes, content version: {version}, flags: {flags}",
size = self.data.len(),
flags = &self.flags,
version = &self.content_version
)
}
}