1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 //! Utilities related to FFI bindings.
13 #![unstable(feature = "std_misc",
14 reason = "module just underwent fairly large reorganization and the dust \
15 still needs to settle")]
17 pub use self::c_str::{CString, CStr, NulError, IntoBytes};
19 pub use self::c_str::c_str_to_bytes;
21 pub use self::c_str::c_str_to_bytes_with_nul;
23 pub use self::os_str::OsString;
24 pub use self::os_str::OsStr;
29 // FIXME (#21670): these should be defined in the os_str module
30 /// Freely convertible to an `&OsStr` slice.
32 /// Convert to an `&OsStr` slice.
33 fn as_os_str(&self) -> &OsStr;