pub struct HandleFlags(/* private fields */);Expand description
The flags a handle carries: whether a child process created with handle inheritance gets a copy of it, and whether closing it is refused.
A newtype over the Win32 bits, combined with |, because Windows defines the two the page
documents and this crate does not narrow what the call reports: a bit it has never heard of is
kept by from_bits and bits and is not an error.
§Example
use win_handles_sys::HandleFlags;
let both = HandleFlags::INHERIT | HandleFlags::PROTECT_FROM_CLOSE;
assert!(both.contains(HandleFlags::INHERIT));
assert!(both.contains(HandleFlags::PROTECT_FROM_CLOSE));
assert!(!HandleFlags::INHERIT.contains(HandleFlags::PROTECT_FROM_CLOSE));
assert_eq!(HandleFlags::default(), HandleFlags::NONE);Implementations§
Source§impl HandleFlags
impl HandleFlags
Sourcepub const INHERIT: Self
pub const INHERIT: Self
HANDLE_FLAG_INHERIT: a child process created with handle inheritance gets a copy of the handle.
Sourcepub const PROTECT_FROM_CLOSE: Self
pub const PROTECT_FROM_CLOSE: Self
HANDLE_FLAG_PROTECT_FROM_CLOSE: closing the handle is refused.
Trait Implementations§
Source§impl BitOr for HandleFlags
impl BitOr for HandleFlags
Source§impl Clone for HandleFlags
impl Clone for HandleFlags
impl Copy for HandleFlags
Source§impl Debug for HandleFlags
impl Debug for HandleFlags
Source§impl Default for HandleFlags
impl Default for HandleFlags
impl Eq for HandleFlags
Source§impl Hash for HandleFlags
impl Hash for HandleFlags
Source§impl PartialEq for HandleFlags
impl PartialEq for HandleFlags
impl StructuralPartialEq for HandleFlags
Auto Trait Implementations§
impl Freeze for HandleFlags
impl RefUnwindSafe for HandleFlags
impl Send for HandleFlags
impl Sync for HandleFlags
impl Unpin for HandleFlags
impl UnsafeUnpin for HandleFlags
impl UnwindSafe for HandleFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more