pub enum ReflectCloneError {
NotImplemented {
type_path: Cow<'static, str>,
},
NotCloneable {
type_path: Cow<'static, str>,
},
FieldNotCloneable {
field: FieldId,
variant: Option<Cow<'static, str>>,
container_type_path: Cow<'static, str>,
},
FailedDowncast {
expected: Cow<'static, str>,
received: Cow<'static, str>,
},
}
Expand description
An error that occurs when cloning a type via PartialReflect::reflect_clone
.
Variants§
NotImplemented
The type does not have a custom implementation for PartialReflect::reflect_clone
.
NotCloneable
The type cannot be cloned via PartialReflect::reflect_clone
.
This type should be returned when a type is intentionally opting out of reflection cloning.
FieldNotCloneable
The field cannot be cloned via PartialReflect::reflect_clone
.
When deriving Reflect
, this usually means that a field marked with #[reflect(ignore)]
is missing a #[reflect(clone)]
attribute.
This may be intentional if the field is not meant/able to be cloned.
FailedDowncast
Could not downcast to the expected type.
Realistically this should only occur when a type has incorrectly implemented Reflect
.
Trait Implementations§
Source§impl Clone for ReflectCloneError
impl Clone for ReflectCloneError
Source§fn clone(&self) -> ReflectCloneError
fn clone(&self) -> ReflectCloneError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReflectCloneError
impl Debug for ReflectCloneError
Source§impl Display for ReflectCloneError
impl Display for ReflectCloneError
Source§impl Error for ReflectCloneError
impl Error for ReflectCloneError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for ReflectCloneError
impl PartialEq for ReflectCloneError
impl Eq for ReflectCloneError
impl StructuralPartialEq for ReflectCloneError
Auto Trait Implementations§
impl Freeze for ReflectCloneError
impl RefUnwindSafe for ReflectCloneError
impl Send for ReflectCloneError
impl Sync for ReflectCloneError
impl Unpin for ReflectCloneError
impl UnwindSafe for ReflectCloneError
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
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.