Struct fencryption_lib::pack::Pack
source · pub struct Pack(_);Expand description
Pack is used to pack files and their paths in a single file.
Implementations
sourceimpl Pack
impl Pack
pub fn new<P>(path: P) -> Packwhere
P: AsRef<Path>,
sourcepub fn create<P>(&self, dir_path: P) -> Result<(), ErrorKind>where
P: AsRef<Path>,
pub fn create<P>(&self, dir_path: P) -> Result<(), ErrorKind>where
P: AsRef<Path>,
Creates/Writes the pack file using the contents of the given directory.
sourcepub fn unpack<P>(&self, output_path: P) -> Result<(), ErrorKind>where
P: AsRef<Path>,
pub fn unpack<P>(&self, output_path: P) -> Result<(), ErrorKind>where
P: AsRef<Path>,
Unpacks the pack from the associated pack file (fails if the pack file doesn’t exist).
pub fn path(&self) -> &PathBuf
Auto Trait Implementations
impl RefUnwindSafe for Pack
impl Send for Pack
impl Sync for Pack
impl Unpin for Pack
impl UnwindSafe for Pack
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more