#[allow(unused_imports)]
use anyhow::Context;
#[cfg(windows)]
pub trait BorrowedHandleContext {
fn try_clone_to_owned_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: os :: windows :: io :: OwnedHandle > );
}
#[cfg(windows)]
impl BorrowedHandleContext for std :: os :: windows :: io :: BorrowedHandle < '_ > {
fn try_clone_to_owned_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: os :: windows :: io :: OwnedHandle > ) {
std :: os :: windows :: io :: BorrowedHandle :: < '_ > :: try_clone_to_owned(self)
.with_context(|| crate::call_failed!(Some(self), "try_clone_to_owned"))
}
}
#[cfg(windows)]
pub trait BorrowedSocketContext {
fn try_clone_to_owned_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: os :: windows :: io :: OwnedSocket > );
}
#[cfg(windows)]
impl BorrowedSocketContext for std :: os :: windows :: io :: BorrowedSocket < '_ > {
fn try_clone_to_owned_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: os :: windows :: io :: OwnedSocket > ) {
std :: os :: windows :: io :: BorrowedSocket :: < '_ > :: try_clone_to_owned(self)
.with_context(|| crate::call_failed!(Some(self), "try_clone_to_owned"))
}
}
#[cfg(windows)]
pub trait OwnedHandleContext: Sized {
fn try_clone_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < Self > );
}
#[cfg(windows)]
impl OwnedHandleContext for std :: os :: windows :: io :: OwnedHandle {
fn try_clone_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < Self > ) {
std :: os :: windows :: io :: OwnedHandle :: try_clone(self)
.with_context(|| crate::call_failed!(Some(self), "try_clone"))
}
}
#[cfg(windows)]
pub trait OwnedSocketContext: Sized {
fn try_clone_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < Self > );
}
#[cfg(windows)]
impl OwnedSocketContext for std :: os :: windows :: io :: OwnedSocket {
fn try_clone_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < Self > ) {
std :: os :: windows :: io :: OwnedSocket :: try_clone(self)
.with_context(|| crate::call_failed!(Some(self), "try_clone"))
}
}