// This file was automatically generated by `elaborate`.
// https://github.com/trailofbits/elaborate

#[allow(unused_imports)]
use anyhow::Context;



#[cfg(unix)]
pub trait BorrowedFdContext {
/// Creates a new `OwnedFd` instance that shares the same underlying file
/// description as the existing `BorrowedFd` instance.
fn try_clone_to_owned_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: os :: fd :: OwnedFd > );
}
#[cfg(unix)]
impl BorrowedFdContext for std :: os :: fd :: BorrowedFd < '_ > {
fn try_clone_to_owned_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < std :: os :: fd :: OwnedFd > ) {
    std :: os :: fd :: BorrowedFd :: < '_ > :: try_clone_to_owned(self)
        .with_context(|| crate::call_failed!(Some(self), "try_clone_to_owned"))
}
}
#[cfg(unix)]
pub trait OwnedFdContext: Sized {
/// Creates a new `OwnedFd` instance that shares the same underlying file
/// description as the existing `OwnedFd` instance.
fn try_clone_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < Self > );
}
#[cfg(unix)]
impl OwnedFdContext for std :: os :: fd :: OwnedFd {
fn try_clone_wc ( & self ) -> crate :: rewrite_output_type ! ( std :: io :: Result < Self > ) {
    std :: os :: fd :: OwnedFd :: try_clone(self)
        .with_context(|| crate::call_failed!(Some(self), "try_clone"))
}
}

