pub struct ReopenOptions<A: DataAccess = NoData> { /* private fields */ }Expand description
What to reopen with: the data access, the other rights, what other opens may do meanwhile, and the
flags ReOpenFile takes that an open by path also offers. A reopen is shared for reading, writing
and deletion until share says otherwise, as FileOptions
shares an open.
There is no disposition, since a reopen reaches only what is open, and no attributes, which the
page says cannot be given. FILE_FLAG_BACKUP_SEMANTICS and FILE_FLAG_WRITE_THROUGH, which the
page lists, are not in v1, as for an open by path; the named-pipe security flags it lists for a
pipe’s client are not offered either, since what this reopens is a file.
The share mode is judged against every handle still open to the file, the original among them: a reopen that does not share what the original asked for, or asks for what the original does not share, is refused, as the page says.
use win_durable_ioring::windows_backend::{ReadOnly, ReopenOptions};
let options: ReopenOptions<ReadOnly> = ReopenOptions::new().read();Implementations§
Source§impl ReopenOptions<NoData>
impl ReopenOptions<NoData>
Source§impl<A: DataAccess> ReopenOptions<A>
impl<A: DataAccess> ReopenOptions<A>
Sourcepub fn read(self) -> ReopenOptions<A::WithRead>
pub fn read(self) -> ReopenOptions<A::WithRead>
Ask for the right to read the data, as FileOptions::read does.
Sourcepub fn write(self) -> ReopenOptions<A::WithWrite>
pub fn write(self) -> ReopenOptions<A::WithWrite>
Ask for the right to write the data, as FileOptions::write does.
Sourcepub fn rights(self, rights: FileRights) -> Self
pub fn rights(self, rights: FileRights) -> Self
The rights besides the data access, as FileOptions::rights
takes them. Calling this again replaces them.
What other opens may request while this handle is open (dwShareMode), as
FileOptions::share takes it. Calling this again replaces it.
Sourcepub fn open_reparse_point(self, open_reparse_point: bool) -> Self
pub fn open_reparse_point(self, open_reparse_point: bool) -> Self
Reopen a reparse point itself (FILE_FLAG_OPEN_REPARSE_POINT). The page says the flag is
ignored for a file that is not a reparse point.
Sourcepub fn delete_on_close(self, delete_on_close: bool) -> Self
pub fn delete_on_close(self, delete_on_close: bool) -> Self
Delete the file when its last handle is closed (FILE_FLAG_DELETE_ON_CLOSE), as
FileOptions::delete_on_close describes. The page says
the file goes when all of its handles are closed, the original’s and its duplicates’ too.
Sourcepub fn open_no_recall(self, open_no_recall: bool) -> Self
pub fn open_no_recall(self, open_no_recall: bool) -> Self
Ask that the data not be brought back from remote storage (FILE_FLAG_OPEN_NO_RECALL), as
FileOptions::open_no_recall does.
Sourcepub fn posix_semantics(self, posix_semantics: bool) -> Self
pub fn posix_semantics(self, posix_semantics: bool) -> Self
Access the file by POSIX rules (FILE_FLAG_POSIX_SEMANTICS), as
FileOptions::posix_semantics describes.
Sourcepub fn overlapped(self, overlapped: bool) -> Self
pub fn overlapped(self, overlapped: bool) -> Self
Reopen for overlapped I/O (FILE_FLAG_OVERLAPPED), as
FileOptions::overlapped describes.
Sourcepub fn random_access(self, random_access: bool) -> Self
pub fn random_access(self, random_access: bool) -> Self
The random-access hint (FILE_FLAG_RANDOM_ACCESS), as
FileOptions::random_access describes.
Sourcepub fn sequential_scan(self, sequential_scan: bool) -> Self
pub fn sequential_scan(self, sequential_scan: bool) -> Self
The sequential-scan hint (FILE_FLAG_SEQUENTIAL_SCAN), as
FileOptions::sequential_scan describes.