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

PlatformTypes

Trait PlatformTypes 

Source
pub trait PlatformTypes {
Show 17 associated items type SignedChar: SignedInt; type UnsignedChar: UnsignedInt; type SignedShort: SignedInt; type UnsignedShort: UnsignedInt; type SignedInt: SignedInt; type UnsignedInt: UnsignedInt; type SignedLong: SignedInt; type UnsignedLong: UnsignedInt; type SignedLongLong: SignedInt; type UnsignedLongLong: UnsignedInt; type IntMax: SignedInt; type UIntMax: UnsignedInt; type SignedSize: SignedInt; type Size: UnsignedInt; type PointerDiff: SignedInt; type UnsignedPointerDiff: UnsignedInt; type Pointer: PointerInt;
}
Expand description

Describes the native C/C++ integer and pointer types of the producing platform for all printf conversion specifiers and length modifiers.

Required Associated Types§

Source

type SignedChar: SignedInt

Native signed char type (hh signed conversions, e.g., i8).

Source

type UnsignedChar: UnsignedInt

Native unsigned char type (hh unsigned conversions, e.g., u8).

Source

type SignedShort: SignedInt

Native short type (h signed conversions, e.g., i16).

Source

type UnsignedShort: UnsignedInt

Native unsigned short type (h unsigned conversions, e.g., u16).

Source

type SignedInt: SignedInt

Native int type (default signed conversions without length modifier, e.g., i32).

Source

type UnsignedInt: UnsignedInt

Native unsigned int type (default unsigned conversions without length modifier, e.g., u32).

Source

type SignedLong: SignedInt

Native long type (l signed conversions, e.g., i32 on ILP32/LLP64, i64 on LP64).

Source

type UnsignedLong: UnsignedInt

Native unsigned long type (l unsigned conversions, e.g., u32 on ILP32/LLP64, u64 on LP64).

Source

type SignedLongLong: SignedInt

Native long long type (ll signed conversions, e.g., i64).

Source

type UnsignedLongLong: UnsignedInt

Native unsigned long long type (ll unsigned conversions, e.g., u64).

Source

type IntMax: SignedInt

Native intmax_t type (j signed conversions, e.g., i64).

Source

type UIntMax: UnsignedInt

Native uintmax_t type (j unsigned conversions, e.g., u64).

Source

type SignedSize: SignedInt

Native signed size_t / ssize_t type (z signed conversions, e.g., i32 on ILP32, i64 on LP64/LLP64).

Source

type Size: UnsignedInt

Native size_t type (z unsigned conversions, e.g., u32 on ILP32, u64 on LP64/LLP64).

Source

type PointerDiff: SignedInt

Native ptrdiff_t type (t signed conversions, e.g., i32 on ILP32, i64 on LP64/LLP64).

Source

type UnsignedPointerDiff: UnsignedInt

Native unsigned ptrdiff_t type (t unsigned conversions, e.g., u32 on ILP32, u64 on LP64/LLP64).

Source

type Pointer: PointerInt

Native pointer integer type (%p conversions / uintptr_t, e.g., u32 on ILP32, u64 on LP64/LLP64).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl PlatformTypes for Ilp32Platform

Source§

impl PlatformTypes for Llp64Platform

Source§

impl PlatformTypes for Lp64Platform