pub struct QueryItem<'a> { /* private fields */ }Expand description
A single query result item
§APIs
QueryItem only has data type APIs like get_str() instead of
directly get_filename(), etc.
This is mainly for symmetric APIs: in query() you need call request_flags() with needed RequestFlags,
requiring the same RequestFlags for getting the data will make the code symmetric and eaiser to read.
A fully type-safe API may be added in the future if it won’t blow up the compile time.
Implementations§
Source§impl QueryItem<'_>
impl QueryItem<'_>
Sourcepub fn get_ptr(&self, flag: RequestFlags) -> Option<*const u8>
pub fn get_ptr(&self, flag: RequestFlags) -> Option<*const u8>
Get raw data pointer for a request flag
Sourcepub fn get_str(&self, flag: RequestFlags) -> Option<&U16CStr>
pub fn get_str(&self, flag: RequestFlags) -> Option<&U16CStr>
Get string value for a request flag
Sourcepub fn get_string(&self, flag: RequestFlags) -> Option<String>
pub fn get_string(&self, flag: RequestFlags) -> Option<String>
Get string value for a request flag
Prefer QueryItem::get_str() when possible.
Sourcepub fn get_size(&self, flag: RequestFlags) -> Option<u64>
pub fn get_size(&self, flag: RequestFlags) -> Option<u64>
Get size value for a request flag
Sourcepub fn get_time(&self, flag: RequestFlags) -> Option<FILETIME>
pub fn get_time(&self, flag: RequestFlags) -> Option<FILETIME>
Get date value for a request flag
Sourcepub fn get_u32(&self, flag: RequestFlags) -> Option<u32>
pub fn get_u32(&self, flag: RequestFlags) -> Option<u32>
Get dword value for a request flag
Sourcepub fn get(&self, flag: RequestFlags) -> Option<QueryValue<'_>>
pub fn get(&self, flag: RequestFlags) -> Option<QueryValue<'_>>
Get value for a request flag as a QueryValue enum
Sourcepub fn keys(&self) -> impl Iterator<Item = RequestFlags>
pub fn keys(&self) -> impl Iterator<Item = RequestFlags>
Iterator over all requested flags and their values
Sourcepub fn items(&self) -> impl Iterator<Item = (RequestFlags, QueryValue<'_>)>
pub fn items(&self) -> impl Iterator<Item = (RequestFlags, QueryValue<'_>)>
Iterator over all requested flags and their values
Sourcepub fn items_with_name(
&self,
) -> impl Iterator<Item = (&'static str, RequestFlags, QueryValue<'_>)>
pub fn items_with_name( &self, ) -> impl Iterator<Item = (&'static str, RequestFlags, QueryValue<'_>)>
Iterator over all requested flags and their values