pub unsafe trait AsPseudoConsole {
// Required method
fn raw_pseudoconsole(&self) -> isize;
}Expand description
A borrowed pseudoconsole capability.
§Safety
Implementations must return a valid, nonzero HPCON and keep it open and
unchanged for the full lifetime of every borrow passed to
crate::SpawnOptions::pseudoconsole. The implementation retains
ownership: windows-spawn borrows the value for process creation and never closes
or releases it.
Required Methods§
Sourcefn raw_pseudoconsole(&self) -> isize
fn raw_pseudoconsole(&self) -> isize
Returns the borrowed raw HPCON value.
Library implementations use this method to bridge their owned
pseudoconsole type to windows-spawn. Applications should normally pass the
implementing object to crate::SpawnOptions::pseudoconsole instead
of reading the numeric value.
The returned value must satisfy the trait’s safety contract. Calling this method does not transfer ownership.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".