Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_format
  5. SignedInt

SignedInt

Trait SignedInt 

Source
pub trait SignedInt: Copy + Into<i64> {
    // Required method
    fn truncate_i64(v: i64) -> i64;
}
Expand description

Trait implemented by target platform signed integer types (i8, i16, i32, i64).

Required Methods§

Source

fn truncate_i64(v: i64) -> i64

Truncates a 64-bit signed value to this type’s width following C integer conversion rules, and sign-extends the result back to i64.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SignedInt for i8

Source§

impl SignedInt for i16

Source§

impl SignedInt for i32

Source§

impl SignedInt for i64

Implementors§