Skip to main content

VaArgSafe

Trait VaArgSafe 

1.99.0 · Source
pub unsafe trait VaArgSafe { }
This trait cannot be implemented outside core.
Expand description

Types that are valid to read using VaList::next_arg.

This trait is implemented for primitive types that have a variable argument application-binary interface (ABI) on the current platform. It is always implemented for:

Implementations for e.g. i32 or usize shouldn’t be relied upon directly, because they may not be available on all platforms.

§Safety

When C passes variable arguments, signed integers smaller than c_int are promoted to c_int, unsigned integers smaller than c_uint are promoted to c_uint, and c_float is promoted to c_double. Implementing this trait for types that are subject to this promotion rule is invalid.

This trait is only implemented for 128-bit integers when the platform defines the __int128 type.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

1.99.0 · Source§

impl VaArgSafe for f64

1.99.0 · Source§

impl VaArgSafe for i32

1.99.0 · Source§

impl VaArgSafe for i64

Source§

impl VaArgSafe for i128

1.99.0 · Source§

impl VaArgSafe for isize

1.99.0 · Source§

impl VaArgSafe for u32

1.99.0 · Source§

impl VaArgSafe for u64

Source§

impl VaArgSafe for u128

1.99.0 · Source§

impl VaArgSafe for usize

1.99.0 · Source§

impl<T> VaArgSafe for *const T

1.99.0 · Source§

impl<T> VaArgSafe for *mut T