Skip to main content

tipc_std/
clone_ext.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 KylinSoft Co., Ltd. <https://www.kylinos.cn/>
3// See LICENSES for license details.
4
5//! Fallible clone trait for tipc-std.
6
7/// Trait for fallible duplication of types that can be cloned.
8pub trait TryClone: Sized {
9    type Error;
10    fn try_clone(&self) -> Result<Self, Self::Error>;
11}