pub struct ObjectType(/* private fields */);Expand description
The kind of object a handle names, which GetSecurityInfo needs to know to find its security.
A newtype over SE_OBJECT_TYPE, because Windows defines more kinds than are named here and this
crate removes none of them. get_security_info passes only the kinds
reads_any_handle names; get_security_info_unchecked takes every
kind, from a caller who knows the kind of the object the handle names.
§Example
use win_authorization_sys::ObjectType;
assert_ne!(ObjectType::FILE, ObjectType::KERNEL_OBJECT);
assert_eq!(ObjectType::from_raw(ObjectType::FILE.as_raw()), ObjectType::FILE);Implementations§
Source§impl ObjectType
impl ObjectType
Sourcepub const FILE: Self
pub const FILE: Self
SE_FILE_OBJECT: a file or directory, or a named pipe or other object a file handle names.
Sourcepub const REGISTRY_KEY: Self
pub const REGISTRY_KEY: Self
SE_REGISTRY_KEY: a registry key.
Sourcepub const KERNEL_OBJECT: Self
pub const KERNEL_OBJECT: Self
SE_KERNEL_OBJECT: a kernel object that has no kind of its own here, such as an event, a
mutex, a semaphore, a process or a thread.
Sourcepub const WINDOW_OBJECT: Self
pub const WINDOW_OBJECT: Self
SE_WINDOW_OBJECT: a window station or desktop.
Sourcepub const DS_OBJECT_ALL: Self
pub const DS_OBJECT_ALL: Self
SE_DS_OBJECT_ALL: a directory service object and its properties.
Sourcepub const PROVIDER_DEFINED: Self
pub const PROVIDER_DEFINED: Self
SE_PROVIDER_DEFINED_OBJECT: an object of a provider’s own kind.
Sourcepub const REGISTRY_WOW64_32KEY: Self
pub const REGISTRY_WOW64_32KEY: Self
SE_REGISTRY_WOW64_32KEY: a registry key in the 32-bit view.
Sourcepub const REGISTRY_WOW64_64KEY: Self
pub const REGISTRY_WOW64_64KEY: Self
SE_REGISTRY_WOW64_64KEY: a registry key in the 64-bit view.
Sourcepub const fn reads_any_handle(self) -> bool
pub const fn reads_any_handle(self) -> bool
Whether get_security_info passes this kind with a handle of any kind: the kinds under
which Windows was measured reading the security of the handle it is given, whatever the
handle names, and UNKNOWN, which it refuses with its own code. Every other kind is for
get_security_info_unchecked.