Module rustix::path::arg

source ·
Expand description

Convenient and efficient string argument passing.

This module defines the Arg trait and implements it for several common string types. This allows users to pass any of these string types directly to rustix APIs with string arguments, and it allows rustix to implement NUL-termination without the need for copying or dynamic allocation where possible.

Traits§

  • A trait for passing path arguments.

Functions§

  • Runs a closure on arg where A is mapped to a &CStr
  • with_c_str 🔒
    Runs a closure with bytes passed in as a &CStr.
  • The slow path which handles any length. In theory OS’s only support up to PATH_MAX, but we let the OS enforce that.