pub enum CloneValidity {
Cloneable,
Invalid,
PossiblyInvalid,
Unknown,
}Expand description
Result of classifying a type for clone validity (see Type::clone_validity).
Variants§
Cloneable
Every member is (or may be) an object — cloning is fine.
Invalid
Every member is definitely a non-object — cloning is an error.
PossiblyInvalid
Some members are non-objects, some are objects — cloning may be an error.
Unknown
Empty/unknown type — no diagnostic.
Trait Implementations§
Source§impl Clone for CloneValidity
impl Clone for CloneValidity
Source§fn clone(&self) -> CloneValidity
fn clone(&self) -> CloneValidity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CloneValidity
Source§impl Debug for CloneValidity
impl Debug for CloneValidity
impl Eq for CloneValidity
Source§impl PartialEq for CloneValidity
impl PartialEq for CloneValidity
Source§fn eq(&self, other: &CloneValidity) -> bool
fn eq(&self, other: &CloneValidity) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CloneValidity
Auto Trait Implementations§
impl Freeze for CloneValidity
impl RefUnwindSafe for CloneValidity
impl Send for CloneValidity
impl Sync for CloneValidity
impl Unpin for CloneValidity
impl UnsafeUnpin for CloneValidity
impl UnwindSafe for CloneValidity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.