Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. pw_cast
  6. CastInto

CastInto

Trait CastInto 

Source
pub trait CastInto<T> {
    // Required method
    fn cast_into(self) -> T;
}
Expand description

Like [Into], but supporting target-specific casts.

See CastFrom’s docs for more information.

Like [Into], CastInto only supports lossless casts.

Required Methods§

Source

fn cast_into(self) -> T

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, U: CastFrom<T>> CastInto<U> for T