pub enum CastError {
Show 13 variants
ErrorReported,
CastToBool,
CastToChar,
DifferingKinds,
SizedUnsizedCast,
IllegalCast,
NeedDeref,
NeedViaPtr,
NeedViaThinPtr,
NeedViaInt,
NonScalar,
UnknownExprPtrKind,
UnknownCastPtrKind,
}Variants
ErrorReported
CastToBool
CastToChar
DifferingKinds
SizedUnsizedCast
Cast of thin to fat raw ptr (e.g., *const () as *const [u8]).
IllegalCast
NeedDeref
NeedViaPtr
NeedViaThinPtr
NeedViaInt
NonScalar
UnknownExprPtrKind
UnknownCastPtrKind
Trait Implementations
sourceimpl From<ErrorReported> for CastError
impl From<ErrorReported> for CastError
sourcefn from(ErrorReported: ErrorReported) -> Self
fn from(ErrorReported: ErrorReported) -> Self
Performs the conversion.
impl Copy for CastError
Auto Trait Implementations
impl RefUnwindSafe for CastError
impl Send for CastError
impl Sync for CastError
impl Unpin for CastError
impl UnwindSafe for CastError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
ErrorReported: 0 bytesCastToBool: 0 bytesCastToChar: 0 bytesDifferingKinds: 0 bytesSizedUnsizedCast: 0 bytesIllegalCast: 0 bytesNeedDeref: 0 bytesNeedViaPtr: 0 bytesNeedViaThinPtr: 0 bytesNeedViaInt: 0 bytesNonScalar: 0 bytesUnknownExprPtrKind: 0 bytesUnknownCastPtrKind: 0 bytes