pub struct EnumerationRequest { /* private fields */ }Expand description
One directory to enumerate, with the predicate and bounds that apply to it.
Implementations§
Source§impl EnumerationRequest
impl EnumerationRequest
Sourcepub fn new(path: &Wtf16Str) -> Result<Self, RequestError>
pub fn new(path: &Wtf16Str) -> Result<Self, RequestError>
Build a request for a native WTF-16 path.
The path is validated and, unless it is already a verbatim \\?\ path,
resolved to its fully qualified form now. The stored value is exactly
what a worker will later open.
§Errors
Returns RequestError for an empty path, an interior NUL, a \\?\
path that is not fully qualified, an ordinary path longer than
MAX_PATH before or after resolution, or a resolution failure reported
by Windows.
Sourcepub fn for_path(path: &Path) -> Result<Self, RequestError>
pub fn for_path(path: &Path) -> Result<Self, RequestError>
Sourcepub fn with_predicate(self, predicate: impl Into<EntryPredicate>) -> Self
pub fn with_predicate(self, predicate: impl Into<EntryPredicate>) -> Self
Set the predicate entries must satisfy to be delivered.
Infallible because a QueryByExample validates
each clause as it is added, so an invalid predicate cannot be built in
the first place.
Sourcepub fn with_file_identity(self, mode: FileIdentityMode) -> Self
pub fn with_file_identity(self, mode: FileIdentityMode) -> Self
Set how much work the request will do for file identity.
Sourcepub fn with_buffer_capacity(self, bytes: usize) -> Result<Self, RequestError>
pub fn with_buffer_capacity(self, bytes: usize) -> Result<Self, RequestError>
Set the native buffer capacity, in bytes.
The value is clamped up to MINIMUM_BUFFER_CAPACITY and then rounded
up to the record alignment. The result is fixed for the request’s whole
life: the buffer never grows in response to what a directory turns out to
contain, because a bound that silently moves is not a bound. Read the
value back with buffer_capacity.
§Errors
Returns RequestFailure::BufferCapacityUnrepresentable if the aligned
capacity cannot be passed to Win32 as a u32.
Sourcepub fn predicate(&self) -> &EntryPredicate
pub fn predicate(&self) -> &EntryPredicate
The predicate entries must satisfy.
Sourcepub fn file_identity_mode(&self) -> FileIdentityMode
pub fn file_identity_mode(&self) -> FileIdentityMode
How much work the request will do for file identity.
Sourcepub fn buffer_capacity(&self) -> usize
pub fn buffer_capacity(&self) -> usize
The effective native buffer capacity, in bytes, after clamping and alignment.
Trait Implementations§
Source§impl Clone for EnumerationRequest
impl Clone for EnumerationRequest
Source§fn clone(&self) -> EnumerationRequest
fn clone(&self) -> EnumerationRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more