pub struct Container {
pub comment: String,
pub x: u64,
pub y: u64,
pub z: u64,
pub files: Vec<File>,
}
Fields§
§comment: String
§x: u64
§y: u64
§z: u64
§files: Vec<File>
Implementations§
Source§impl Container
impl Container
pub fn new(comment: &str) -> Result<Container, Box<dyn Error>>
pub fn from_bytes(bytes: &[u8]) -> Result<Container, Box<dyn Error>>
pub fn add_file(&mut self, file: File)
pub fn remove_file(&mut self, name: String)
pub fn get_file(&self, name: String) -> Option<&File>
pub fn to_bytes(&self) -> Result<Vec<u8>, Box<dyn Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more