devela/text/str/
reexports.rs1use crate::{TAG_TEXT, impl_cdef, reexport};
10
11reexport! { rust: core::str,
14 tag: TAG_TEXT!(),
15 doc: "Parse a value from a string.",
16 FromStr
17}
18
19reexport! { rust: alloc::string,
22 tag: TAG_TEXT!(),
23 doc: "A UTF-8–encoded, growable string.",
24 String
25}
26reexport! { rust: alloc::string,
27 tag: TAG_TEXT!(),
28 doc: "A trait for converting a value to a [`String`].",
29 ToString
30}
31
32reexport! { rust: std::ffi,
35 tag: TAG_TEXT!(),
36 doc: "Borrowed reference to an OS string (See [`OsString`]).",
37 OsStr
38}
39reexport! { rust: std::ffi,
40 tag: TAG_TEXT!(),
41 doc: "A type for owned, mutable native strings, interconvertible with Rust strings.",
42 OsString
43}
44
45pub use crate::CStr;
48#[cfg(feature = "alloc")]
49pub use crate::CString;
50
51impl_cdef!["" => &str];
54#[cfg(all(not(feature = "safe_text"), feature = "unsafe_str"))]
55#[cfg_attr(nightly_doc, doc(cfg(feature = "unsafe_str")))]
56impl crate::ConstDefault for &mut str {
57 const DEFAULT: Self = unsafe { ::core::str::from_utf8_unchecked_mut(&mut []) };
59}
60#[cfg(feature = "alloc")]
61impl_cdef![Self::new() => String];