pub struct Archive { /* private fields */ }Expand description
A set of files to place into a container in one request.
Implementations§
Source§impl Archive
impl Archive
Sourcepub fn add_file(
&mut self,
path: &str,
contents: &[u8],
mode: u32,
) -> Result<(), GenericError>
pub fn add_file( &mut self, path: &str, contents: &[u8], mode: u32, ) -> Result<(), GenericError>
Adds a file with the given permission bits.
path is relative to the root the archive is placed at, uses / as its separator, and may name directories
that do not exist yet.
§Errors
Returns an error if path is absolute or contains ...
Sourcepub fn add_dir(&mut self, path: &str, mode: u32) -> Result<(), GenericError>
pub fn add_dir(&mut self, path: &str, mode: u32) -> Result<(), GenericError>
Adds a directory with the given permission bits, so the directory has them even if no file of the archive lies in it.
path is relative to the root the archive is placed at, as in Self::add_file.
§Errors
Returns an error if path is absolute or contains ...
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Archive
impl RefUnwindSafe for Archive
impl Send for Archive
impl Sync for Archive
impl Unpin for Archive
impl UnsafeUnpin for Archive
impl UnwindSafe for Archive
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