pub struct MovableEntryHandle { /* private fields */ }zip and blocking only.Expand description
An EntryHandle that owns its MovableArchiveHandle.
Implementations§
Source§impl MovableEntryHandle
impl MovableEntryHandle
Sourcepub fn new(
owner: MovableArchiveHandle,
dependent_builder: impl for<'_q> FnOnce(&'_q MovableArchiveHandle) -> EntryHandle<'_q, File>,
) -> Self
pub fn new( owner: MovableArchiveHandle, dependent_builder: impl for<'_q> FnOnce(&'_q MovableArchiveHandle) -> EntryHandle<'_q, File>, ) -> Self
Constructs a new self-referential struct.
The provided owner will be moved into a heap allocated box. Followed by construction
of the dependent value, by calling dependent_builder with a shared reference to the
owner that remains valid for the lifetime of the constructed struct.
Sourcepub fn try_new<Err>(
owner: MovableArchiveHandle,
dependent_builder: impl for<'_q> FnOnce(&'_q MovableArchiveHandle) -> Result<EntryHandle<'_q, File>, Err>,
) -> Result<Self, Err>
pub fn try_new<Err>( owner: MovableArchiveHandle, dependent_builder: impl for<'_q> FnOnce(&'_q MovableArchiveHandle) -> Result<EntryHandle<'_q, File>, Err>, ) -> Result<Self, Err>
Constructs a new self-referential struct or returns an error.
Consumes owner on error.
Sourcepub fn try_new_or_recover<Err>(
owner: MovableArchiveHandle,
dependent_builder: impl for<'_q> FnOnce(&'_q MovableArchiveHandle) -> Result<EntryHandle<'_q, File>, Err>,
) -> Result<Self, (MovableArchiveHandle, Err)>
pub fn try_new_or_recover<Err>( owner: MovableArchiveHandle, dependent_builder: impl for<'_q> FnOnce(&'_q MovableArchiveHandle) -> Result<EntryHandle<'_q, File>, Err>, ) -> Result<Self, (MovableArchiveHandle, Err)>
Constructs a new self-referential struct or returns an error.
Returns owner and error as tuple on error.
Sourcepub fn borrow_owner<'_q>(&'_q self) -> &'_q MovableArchiveHandle
pub fn borrow_owner<'_q>(&'_q self) -> &'_q MovableArchiveHandle
Borrows owner.
Sourcepub fn with_dependent<'outer_fn, Ret>(
&'outer_fn self,
func: impl for<'_q> FnOnce(&'_q MovableArchiveHandle, &'outer_fn EntryHandle<'_q, File>) -> Ret,
) -> Ret
pub fn with_dependent<'outer_fn, Ret>( &'outer_fn self, func: impl for<'_q> FnOnce(&'_q MovableArchiveHandle, &'outer_fn EntryHandle<'_q, File>) -> Ret, ) -> Ret
Calls given closure func with a shared reference to dependent.
Sourcepub fn with_dependent_mut<'outer_fn, Ret>(
&'outer_fn mut self,
func: impl for<'_q> FnOnce(&'_q MovableArchiveHandle, &'outer_fn mut EntryHandle<'_q, File>) -> Ret,
) -> Ret
pub fn with_dependent_mut<'outer_fn, Ret>( &'outer_fn mut self, func: impl for<'_q> FnOnce(&'_q MovableArchiveHandle, &'outer_fn mut EntryHandle<'_q, File>) -> Ret, ) -> Ret
Calls given closure func with an unique reference to dependent.
Sourcepub fn borrow_dependent<'_q>(&'_q self) -> &'_q EntryHandle<'_q, File>
pub fn borrow_dependent<'_q>(&'_q self) -> &'_q EntryHandle<'_q, File>
Borrows dependent.
Sourcepub fn into_owner(self) -> MovableArchiveHandle
pub fn into_owner(self) -> MovableArchiveHandle
Consumes self and returns the the owner.
Source§impl MovableEntryHandle
impl MovableEntryHandle
Sourcepub fn reader(self) -> Result<MovableEntryHandleReader, UrlError>
pub fn reader(self) -> Result<MovableEntryHandleReader, UrlError>
A version of EntryHandle::reader that returns a MovableEntryHandleReader.