Trait rune::alloc::prelude::TryClone

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

    // Provided method
    fn try_clone_from(&mut self, source: &Self) -> Result<(), Error> { ... }
}
Expand description

Fallible TryClone trait.

Required Methods§

source

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

Try to clone the current value, raising an allocation error if it’s unsuccessful.

Provided Methods§

source

fn try_clone_from(&mut self, source: &Self) -> Result<(), Error>

Performs copy-assignment from source.

a.try_clone_from(&b) is equivalent to a = b.clone() in functionality, but can be overridden to reuse the resources of a to avoid unnecessary allocations.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TryClone for bool

source§

impl TryClone for char

source§

impl TryClone for f32

source§

impl TryClone for f64

source§

impl TryClone for i8

source§

impl TryClone for i16

source§

impl TryClone for i32

source§

impl TryClone for i64

source§

impl TryClone for i128

source§

impl TryClone for isize

source§

impl TryClone for u8

source§

impl TryClone for u16

source§

impl TryClone for u32

source§

impl TryClone for u64

source§

impl TryClone for u128

source§

impl TryClone for ()

source§

impl TryClone for usize

source§

impl TryClone for String

source§

impl TryClone for NonZero<i8>

source§

impl TryClone for NonZero<i16>

source§

impl TryClone for NonZero<i32>

source§

impl TryClone for NonZero<i64>

source§

impl TryClone for NonZero<i128>

source§

impl TryClone for NonZero<isize>

source§

impl TryClone for NonZero<u8>

source§

impl TryClone for NonZero<u16>

source§

impl TryClone for NonZero<u32>

source§

impl TryClone for NonZero<u64>

source§

impl TryClone for NonZero<u128>

source§

impl TryClone for NonZero<usize>

source§

impl<A> TryClone for (A,)
where A: TryClone,

source§

impl<A, B> TryClone for (A, B)
where A: TryClone, B: TryClone,

source§

impl<A, B, C> TryClone for (A, B, C)
where A: TryClone, B: TryClone, C: TryClone,

source§

impl<A, B, C, D> TryClone for (A, B, C, D)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone,

source§

impl<A, B, C, D, E> TryClone for (A, B, C, D, E)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone,

source§

impl<A, B, C, D, E, F> TryClone for (A, B, C, D, E, F)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone,

source§

impl<A, B, C, D, E, F, G> TryClone for (A, B, C, D, E, F, G)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone,

source§

impl<A, B, C, D, E, F, G, H> TryClone for (A, B, C, D, E, F, G, H)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I> TryClone for (A, B, C, D, E, F, G, H, I)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J> TryClone for (A, B, C, D, E, F, G, H, I, J)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J, K> TryClone for (A, B, C, D, E, F, G, H, I, J, K)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone, K: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> TryClone for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone, K: TryClone, L: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> TryClone for (A, B, C, D, E, F, G, H, I, J, K, L, M)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone, K: TryClone, L: TryClone, M: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> TryClone for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone, K: TryClone, L: TryClone, M: TryClone, N: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> TryClone for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
where A: TryClone, B: TryClone, C: TryClone, D: TryClone, E: TryClone, F: TryClone, G: TryClone, H: TryClone, I: TryClone, J: TryClone, K: TryClone, L: TryClone, M: TryClone, N: TryClone, O: TryClone,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> TryClone for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

source§

impl<T> TryClone for Option<T>
where T: TryClone,

source§

impl<T> TryClone for &T
where T: ?Sized,

source§

impl<T> TryClone for Box<[T]>
where T: TryClone,

source§

impl<T> TryClone for Box<T>
where T: TryClone,

source§

fn try_clone(&self) -> Result<Box<T>, Error>

source§

impl<T> TryClone for Rc<T>
where T: ?Sized,

source§

fn try_clone(&self) -> Result<Rc<T>, Error>

source§

impl<T> TryClone for Arc<T>
where T: ?Sized,

source§

fn try_clone(&self) -> Result<Arc<T>, Error>

source§

impl<T, E> TryClone for Result<T, E>
where T: TryClone, E: TryClone,

source§

fn try_clone(&self) -> Result<Result<T, E>, Error>

Implementors§

source§

impl TryClone for AttrStyle

source§

impl TryClone for BinOp

source§

impl TryClone for BuiltIn

source§

impl TryClone for Condition

source§

impl TryClone for Delimiter

source§

impl TryClone for Expr

source§

impl TryClone for ExprClosureArgs

source§

impl TryClone for ExprField

source§

impl TryClone for ExprRangeLimits

source§

impl TryClone for ExprSelectBranch

source§

impl TryClone for rune::ast::Fields

source§

impl TryClone for FnArg

source§

impl TryClone for Item

source§

impl TryClone for ItemModBody

source§

impl TryClone for ItemOrExpr

source§

impl TryClone for ItemUseSegment

source§

impl TryClone for rune::ast::Kind

source§

impl TryClone for Lit

source§

impl TryClone for LitSource

source§

impl TryClone for NumberBase

source§

impl TryClone for NumberSource

source§

impl TryClone for NumberSuffix

source§

impl TryClone for NumberValue

source§

impl TryClone for ObjectIdent

source§

impl TryClone for ObjectKey

source§

impl TryClone for Pat

source§

impl TryClone for PathSegment

source§

impl TryClone for Stmt

source§

impl TryClone for StmtSortKey

source§

impl TryClone for StrSource

source§

impl TryClone for UnOp

source§

impl TryClone for Visibility

source§

impl TryClone for Component

source§

impl TryClone for AssociatedKind

source§

impl TryClone for rune::compile::meta::Fields

source§

impl TryClone for rune::compile::meta::Kind

source§

impl TryClone for DebugArgs

source§

impl TryClone for Call

source§

impl TryClone for ConstValue

source§

impl TryClone for Inst

source§

impl TryClone for InstAddress

source§

impl TryClone for InstAssignOp

source§

impl TryClone for InstOp

source§

impl TryClone for InstRange

source§

impl TryClone for InstTarget

source§

impl TryClone for InstValue

source§

impl TryClone for InstVariant

source§

impl TryClone for PanicReason

source§

impl TryClone for TypeCheck

source§

impl TryClone for TypeInfo

source§

impl TryClone for Value

source§

impl TryClone for Cow<'_, str>

source§

impl TryClone for Abstract

source§

impl TryClone for AlignOf

source§

impl TryClone for Amp

source§

impl TryClone for AmpAmp

source§

impl TryClone for AmpEq

source§

impl TryClone for Arrow

source§

impl TryClone for As

source§

impl TryClone for Async

source§

impl TryClone for At

source§

impl TryClone for Attribute

source§

impl TryClone for Await

source§

impl TryClone for Bang

source§

impl TryClone for BangEq

source§

impl TryClone for Become

source§

impl TryClone for Block

source§

impl TryClone for Break

source§

impl TryClone for ByteIndex

source§

impl TryClone for Caret

source§

impl TryClone for CaretEq

source§

impl TryClone for CloseBrace

source§

impl TryClone for CloseBracket

source§

impl TryClone for CloseEmpty

source§

impl TryClone for CloseParen

source§

impl TryClone for Colon

source§

impl TryClone for ColonColon

source§

impl TryClone for Comma

source§

impl TryClone for Const

source§

impl TryClone for Continue

source§

impl TryClone for Crate

source§

impl TryClone for Dash

source§

impl TryClone for DashEq

source§

impl TryClone for Default

source§

impl TryClone for Div

source§

impl TryClone for Do

source§

impl TryClone for Dollar

source§

impl TryClone for Dot

source§

impl TryClone for DotDot

source§

impl TryClone for DotDotEq

source§

impl TryClone for Else

source§

impl TryClone for EmptyBlock

source§

impl TryClone for Enum

source§

impl TryClone for Eq

source§

impl TryClone for EqEq

source§

impl TryClone for ExprAssign

source§

impl TryClone for ExprAwait

source§

impl TryClone for ExprBinary

source§

impl TryClone for ExprBlock

source§

impl TryClone for ExprBreak

source§

impl TryClone for ExprCall

source§

impl TryClone for ExprClosure

source§

impl TryClone for ExprContinue

source§

impl TryClone for ExprElse

source§

impl TryClone for ExprElseIf

source§

impl TryClone for ExprEmpty

source§

impl TryClone for ExprFieldAccess

source§

impl TryClone for ExprFor

source§

impl TryClone for ExprGroup

source§

impl TryClone for ExprIf

source§

impl TryClone for ExprIndex

source§

impl TryClone for ExprLet

source§

impl TryClone for ExprLit

source§

impl TryClone for ExprLoop

source§

impl TryClone for ExprMatch

source§

impl TryClone for ExprMatchBranch

source§

impl TryClone for ExprObject

source§

impl TryClone for ExprRange

source§

impl TryClone for ExprReturn

source§

impl TryClone for ExprSelect

source§

impl TryClone for ExprSelectPatBranch

source§

impl TryClone for ExprTry

source§

impl TryClone for ExprTuple

source§

impl TryClone for ExprUnary

source§

impl TryClone for ExprVec

source§

impl TryClone for ExprWhile

source§

impl TryClone for ExprYield

source§

impl TryClone for Extern

source§

impl TryClone for False

source§

impl TryClone for Field

source§

impl TryClone for FieldAssign

source§

impl TryClone for File

source§

impl TryClone for Final

source§

impl TryClone for Fn

source§

impl TryClone for For

source§

impl TryClone for Group

source§

impl TryClone for Gt

source§

impl TryClone for GtEq

source§

impl TryClone for GtGt

source§

impl TryClone for GtGtEq

source§

impl TryClone for Ident

source§

impl TryClone for If

source§

impl TryClone for Impl

source§

impl TryClone for In

source§

impl TryClone for Is

source§

impl TryClone for IsNot

source§

impl TryClone for ItemConst

source§

impl TryClone for ItemEnum

source§

impl TryClone for ItemFn

source§

impl TryClone for ItemImpl

source§

impl TryClone for ItemInlineBody

source§

impl TryClone for ItemMod

source§

impl TryClone for ItemStruct

source§

impl TryClone for ItemUse

source§

impl TryClone for ItemUsePath

source§

impl TryClone for ItemVariant

source§

impl TryClone for Label

source§

impl TryClone for Let

source§

impl TryClone for LitBool

source§

impl TryClone for LitByte

source§

impl TryClone for LitByteStr

source§

impl TryClone for LitChar

source§

impl TryClone for LitNumber

source§

impl TryClone for LitStr

source§

impl TryClone for Local

source§

impl TryClone for Loop

source§

impl TryClone for Lt

source§

impl TryClone for LtEq

source§

impl TryClone for LtLt

source§

impl TryClone for LtLtEq

source§

impl TryClone for Macro

source§

impl TryClone for MacroCall

source§

impl TryClone for Match

source§

impl TryClone for Mod

source§

impl TryClone for Move

source§

impl TryClone for Mut

source§

impl TryClone for Not

source§

impl TryClone for Number

source§

impl TryClone for NumberText

source§

impl TryClone for OffsetOf

source§

impl TryClone for OpenBrace

source§

impl TryClone for OpenBracket

source§

impl TryClone for OpenEmpty

source§

impl TryClone for OpenParen

source§

impl TryClone for Override

source§

impl TryClone for PatBinding

source§

impl TryClone for PatIgnore

source§

impl TryClone for PatLit

source§

impl TryClone for PatObject

source§

impl TryClone for PatPath

source§

impl TryClone for PatRest

source§

impl TryClone for PatTuple

source§

impl TryClone for PatVec

source§

impl TryClone for Path

source§

impl TryClone for PathSegmentExpr

source§

impl TryClone for Perc

source§

impl TryClone for PercEq

source§

impl TryClone for Pipe

source§

impl TryClone for PipeEq

source§

impl TryClone for PipePipe

source§

impl TryClone for Plus

source§

impl TryClone for PlusEq

source§

impl TryClone for Pound

source§

impl TryClone for Priv

source§

impl TryClone for Proc

source§

impl TryClone for Pub

source§

impl TryClone for Pure

source§

impl TryClone for QuestionMark

source§

impl TryClone for Ref

source§

impl TryClone for Return

source§

impl TryClone for Rocket

source§

impl TryClone for Select

source§

impl TryClone for SelfType

source§

impl TryClone for SelfValue

source§

impl TryClone for SemiColon

source§

impl TryClone for Shebang

source§

impl TryClone for SizeOf

source§

impl TryClone for SlashEq

source§

impl TryClone for Span

source§

impl TryClone for Star

source§

impl TryClone for StarEq

source§

impl TryClone for Static

source§

impl TryClone for StmtSemi

source§

impl TryClone for StrText

source§

impl TryClone for Struct

source§

impl TryClone for Super

source§

impl TryClone for Tilde

source§

impl TryClone for Token

source§

impl TryClone for True

source§

impl TryClone for TypeOf

source§

impl TryClone for Underscore

source§

impl TryClone for Unsafe

source§

impl TryClone for Use

source§

impl TryClone for Virtual

source§

impl TryClone for While

source§

impl TryClone for Yield

source§

impl TryClone for FieldMeta

source§

impl TryClone for FieldsNamed

source§

impl TryClone for Import

source§

impl TryClone for Signature

source§

impl TryClone for SourceMeta

source§

impl TryClone for ImportStep

source§

impl TryClone for Location

source§

impl TryClone for SyntheticId

source§

impl TryClone for TokenStream

source§

impl TryClone for Id

source§

impl TryClone for NonZeroId

source§

impl TryClone for DebugInfo

source§

impl TryClone for DebugInst

source§

impl TryClone for DebugSignature

source§

impl TryClone for AnyTypeInfo

source§

impl TryClone for Bytes

source§

impl TryClone for CallFrame

source§

impl TryClone for DebugLabel

source§

impl TryClone for FullTypeOf

source§

impl TryClone for Object

source§

impl TryClone for OwnedTuple

source§

impl TryClone for Protocol

source§

impl TryClone for RawStr

source§

impl TryClone for RuntimeContext

source§

impl TryClone for Stack

source§

impl TryClone for SyncFunction

source§

impl TryClone for rune::runtime::Vec

source§

impl TryClone for Vm

source§

impl TryClone for ArrayUnit

source§

impl TryClone for ByteCodeUnit

source§

impl TryClone for Source

source§

impl TryClone for Hash

source§

impl TryClone for SourceId

source§

impl TryClone for PathBuf

source§

impl<'a> TryClone for PathKind<'a>

source§

impl<'a> TryClone for MetaRef<'a>

source§

impl<A> TryClone for ItemBuf<A>
where A: Allocator + Clone,

source§

impl<A> TryClone for rune::alloc::Box<str, A>
where A: Allocator + Clone,

source§

impl<A> TryClone for rune::alloc::Box<Path, A>
where A: Allocator + Clone,

source§

impl<A> TryClone for rune::alloc::String<A>
where A: Allocator + Clone,

source§

impl<K, V, A> TryClone for BTreeMap<K, V, A>
where K: TryClone, V: TryClone, A: Allocator + Clone,

source§

impl<K, V, S, A> TryClone for HashMap<K, V, S, A>
where S: Clone, A: Allocator + Clone, K: TryClone, V: TryClone,

source§

impl<S> TryClone for Logic<S>
where S: TryClone,

source§

impl<S> TryClone for Unit<S>
where S: TryClone,

source§

impl<T> TryClone for CopySource<T>
where T: Copy + TryClone,

source§

impl<T> TryClone for EqValue<T>
where T: TryClone,

source§

impl<T, A> TryClone for RawTable<T, A>
where A: Allocator + Clone, T: TryClone,

source§

impl<T, A> TryClone for BTreeSet<T, A>
where A: Allocator + Clone, T: TryClone,

source§

impl<T, A> TryClone for rune::alloc::Box<[T], A>
where A: Allocator + Clone, T: TryClone,

source§

impl<T, A> TryClone for rune::alloc::Box<T, A>
where A: Allocator + Clone, T: TryClone,

source§

impl<T, A> TryClone for rune::alloc::Vec<T, A>
where A: Allocator + Clone, T: TryClone,

source§

impl<T, A> TryClone for VecDeque<T, A>
where T: TryClone, A: Allocator + Clone,

source§

impl<T, A> TryClone for IntoIter<T, A>
where A: Allocator + Clone, T: TryClone,

source§

impl<T, S> TryClone for AngleBracketed<T, S>
where T: TryClone, S: TryClone,

source§

impl<T, S> TryClone for Braced<T, S>
where T: TryClone, S: TryClone,

source§

impl<T, S> TryClone for Bracketed<T, S>
where T: TryClone, S: TryClone,

source§

impl<T, S> TryClone for Parenthesized<T, S>
where T: TryClone, S: TryClone,

source§

impl<T, S, A> TryClone for HashSet<T, S, A>
where A: Allocator + Clone, T: TryClone, S: Clone,

source§

impl<T: ?Sized> TryClone for Shared<T>