Trait interprocess::TryClone

source ·
pub trait TryClone: Sized {
    // Required method
    fn try_clone(&self) -> Result<Self>;
}
Expand description

Fallible OS object cloning.

The DuplicateHandle/dup system calls can fail for a variety of reasons, most of them being related to system resource exhaustion. This trait is implemented by types in Interprocess which wrap OS objects (which is to say, the majority of types here) to enable handle/file descriptor duplication functionality on them.

Required Methods§

source

fn try_clone(&self) -> Result<Self>

Clones self, possibly returning an error.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl TryClone for interprocess::local_socket::Stream

source§

impl TryClone for ListenerOptions<'_>

source§

impl TryClone for interprocess::os::unix::uds_local_socket::Stream

Available on Unix only.
source§

impl TryClone for Recver

source§

impl TryClone for Sender

source§

impl<T: Clone> TryClone for T