pub struct ReopenRequest<B: Buffering = Cached, A: DataAccess = ReadWrite> { /* private fields */ }Expand description
The request to reopen a handle, built by OpenedFile::request_reopen and made by
perform. It holds the original, shared, so the handle it was built from can be
closed first and the file stays reachable; it is Send, so it can be performed on a thread that
can afford to block; and it can be performed more than once, each time making a new handle.
Implementations§
Source§impl<B: Buffering, A: DataAccess> ReopenRequest<B, A>
impl<B: Buffering, A: DataAccess> ReopenRequest<B, A>
Sourcepub fn original(&self) -> &SharedHandle
pub fn original(&self) -> &SharedHandle
The handle being reopened, shared with its other holders.
Sourcepub fn perform(&self) -> Result<OpenedFile<B, A>>
pub fn perform(&self) -> Result<OpenedFile<B, A>>
Reopen, on the calling thread. This blocks for as long as ReOpenFile does.
§Errors
SharingViolation(as anio::ErrorKind::ResourceBusyerror), naming the file byOpenedBy::Reopen, when the reopen’s access or sharing conflicts with a handle still open to the file, the original among them.- The path open’s checks, made on the reopened handle by the same code:
RemoteDevicewhenBis unbuffered and the original is on a share, andUnknownLocationwhenBis unbuffered and the reopened handle has no final path, as a device’s does not. - Otherwise whatever
ReOpenFilereports, unaltered. The page says the original must have been created byCreateFile, and lists no codes.
Trait Implementations§
Source§impl<B: Clone + Buffering, A: Clone + DataAccess> Clone for ReopenRequest<B, A>
impl<B: Clone + Buffering, A: Clone + DataAccess> Clone for ReopenRequest<B, A>
Auto Trait Implementations§
impl<B, A> Freeze for ReopenRequest<B, A>
impl<B, A> RefUnwindSafe for ReopenRequest<B, A>
impl<B, A> Send for ReopenRequest<B, A>
impl<B, A> Sync for ReopenRequest<B, A>
impl<B, A> Unpin for ReopenRequest<B, A>
impl<B, A> UnsafeUnpin for ReopenRequest<B, A>
impl<B, A> UnwindSafe for ReopenRequest<B, A>
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