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. cast

cast

Macro cast 

Source
macro_rules! cast {
    ($e:expr) => { ... };
    ($e:expr => $t:ty) => { ... };
}
Expand description

Performs a lossless cast.

cast! performs the same cast as CastFrom::cast_from or CastInto::cast_into, but unlike those methods, it works in a const context.