pub struct PackImport { /* private fields */ }Expand description
An import in steps, so a caller can lock the library per item, show
progress and stop between items: PackImport::prepare, then
PackImport::start, then PackImport::step until it returns None.
import_pack runs all of it at once.
Implementations§
Source§impl PackImport
impl PackImport
Sourcepub fn prepare(
lib: &Library,
pack: &Path,
extracted: TempDir,
opts: &PackImportOptions,
) -> Result<PackImport>
pub fn prepare( lib: &Library, pack: &Path, extracted: TempDir, opts: &PackImportOptions, ) -> Result<PackImport>
Reads the unpacked pack and works out the new items and ids, without changing the library.
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl Freeze for PackImport
impl RefUnwindSafe for PackImport
impl Send for PackImport
impl Sync for PackImport
impl Unpin for PackImport
impl UnsafeUnpin for PackImport
impl UnwindSafe for PackImport
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more