Trait tendermint_std_ext::TryClone

source ·
pub trait TryClone: Sized {
    type Error: Error;

    // Required method
    fn try_clone(&self) -> Result<Self, Self::Error>;
}
Expand description

Types that can be cloned where success is not guaranteed can implement this trait.

Required Associated Types§

source

type Error: Error

The type of error that can be returned when an attempted clone operation fails.

Required Methods§

source

fn try_clone(&self) -> Result<Self, Self::Error>

Attempt to clone this instance.

§Errors

Can fail if the underlying instance cannot be cloned (e.g. the OS could be out of file descriptors, or some low-level OS-specific error could be produced).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TryClone for TcpStream

§

type Error = Error

source§

fn try_clone(&self) -> Result<Self, Self::Error>

Implementors§