W3cubDocs

/Rust

Function va_arg

pub unsafe fn va_arg<T>(ap: &mut VaListImpl<'_>) -> Twhere
    T: VaArgSafe,
🔬This is a nightly-only experimental API. (core_intrinsics)

Loads an argument of type T from the va_list ap and increment the argument ap points to.

Safety

This function is only sound to call when:

  • there is a next variable argument available.
  • the next argument’s type must be ABI-compatible with the type T.
  • the next argument must have a properly initialized value of type T.

Calling this function with an incompatible type, an invalid value, or when there are no more variable arguments, is unsound.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/intrinsics/fn.va_arg.html