pub struct ByIdOptions<A: DataAccess = NoData> { /* private fields */ }Expand description
What to open by identifier: the data access, the other rights, what other opens may do meanwhile,
whether a link is opened or followed, and the hints, which are what OpenFileById takes. A file is
shared for reading, writing and deletion until share says otherwise, as
FileOptions shares it.
There is no disposition, since the call opens only what exists; no attributes, which its page
says it ignores; no security descriptor, which it marks reserved; and no delete-on-close or POSIX
semantics, which it does not list. FILE_FLAG_BACKUP_SEMANTICS, which a directory needs, and
FILE_FLAG_WRITE_THROUGH are not in v1, as for an open by path.
use win_durable_ioring::windows_backend::{ByIdOptions, ReadOnly, ShareMode};
let options: ByIdOptions<ReadOnly> = ByIdOptions::new().read().share(ShareMode::READ);Implementations§
Source§impl ByIdOptions<NoData>
impl ByIdOptions<NoData>
Source§impl<A: DataAccess> ByIdOptions<A>
impl<A: DataAccess> ByIdOptions<A>
Sourcepub fn read(self) -> ByIdOptions<A::WithRead>
pub fn read(self) -> ByIdOptions<A::WithRead>
Ask for the right to read the data, as FileOptions::read does.
Sourcepub fn write(self) -> ByIdOptions<A::WithWrite>
pub fn write(self) -> ByIdOptions<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
Open a reparse point itself and not what it points to (FILE_FLAG_OPEN_REPARSE_POINT). The
page says the flag is ignored for a file that is not a reparse point.
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 overlapped(self, overlapped: bool) -> Self
pub fn overlapped(self, overlapped: bool) -> Self
Open 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.