pub struct ZipTestBuilder { /* private fields */ }Expand description
Builder for creating ZIP test archives with various entry types.
§Examples
use exarch_core::test_utils::ZipTestBuilder;
let zip_data = ZipTestBuilder::new()
.add_file("file.txt", b"content")
.add_directory("dir/")
.build();Implementations§
Source§impl ZipTestBuilder
impl ZipTestBuilder
Sourcepub fn add_file_with_mode(self, path: &str, data: &[u8], mode: u32) -> Self
pub fn add_file_with_mode(self, path: &str, data: &[u8], mode: u32) -> Self
Adds a regular file with custom mode.
Sourcepub fn add_directory(self, path: &str) -> Self
pub fn add_directory(self, path: &str) -> Self
Adds a directory to the archive.
Sourcepub fn add_symlink(self, path: &str, target: &str) -> Self
pub fn add_symlink(self, path: &str, target: &str) -> Self
Adds a symlink to the archive.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZipTestBuilder
impl RefUnwindSafe for ZipTestBuilder
impl Send for ZipTestBuilder
impl Sync for ZipTestBuilder
impl Unpin for ZipTestBuilder
impl !UnwindSafe for ZipTestBuilder
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