pub struct SafeArchive;Implementations§
Source§impl SafeArchive
impl SafeArchive
pub fn open<P: AsRef<Path>>(path: P) -> ConduitResult<ZipArchive<File>>
pub fn create<P: AsRef<Path>>(path: P) -> ConduitResult<ZipWriter<File>>
pub fn read_metadata( archive: &mut ZipArchive<File>, name: &str, ) -> ConduitResult<String>
pub fn read_bytes( archive: &mut ZipArchive<File>, name: &str, ) -> ConduitResult<Vec<u8>>
pub fn add_file<W: Write + Seek>( writer: &mut ZipWriter<W>, name: &str, content: &[u8], ) -> ConduitResult<()>
pub fn read_and_deserialize<T>(
archive: &mut ZipArchive<File>,
name: &str,
) -> ConduitResult<T>where
T: DeserializeOwned,
pub fn serialize_and_add<T, W>( writer: &mut ZipWriter<W>, name: &str, data: &T, ) -> ConduitResult<()>
pub fn add_file_from_reader<W, R>( writer: &mut ZipWriter<W>, name: &str, reader: R, ) -> ConduitResult<()>
Auto Trait Implementations§
impl Freeze for SafeArchive
impl RefUnwindSafe for SafeArchive
impl Send for SafeArchive
impl Sync for SafeArchive
impl Unpin for SafeArchive
impl UnsafeUnpin for SafeArchive
impl UnwindSafe for SafeArchive
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