devela/sys/env/
reexports.rs

1// devela::sys::env::reexports
2//
3//! Reexported items from `core`.
4//
5
6use crate::reexport;
7
8/* std items */
9
10reexport! { rust: std::env,
11    tag: crate::TAG_ITERATOR!(),
12    doc: "Iterates over the arguments of a process, yielding them as [`String`][crate::String]s.",
13    @Args as IterArgs,
14}
15reexport! { rust: std::env,
16    tag: crate::TAG_ITERATOR!(),
17    doc: "Iterates over the arguments of a process, yielding them as
18[`OsString`][crate::OsString]s.",
19    @ArgsOs as IterArgsOs,
20}
21reexport! { rust: std::env,
22    tag: crate::TAG_ITERATOR!(),
23    doc: "An iterator over a snapshot of the environment variables of this process.",
24    @Vars as IterVars,
25}
26reexport! { rust: std::env,
27    tag: crate::TAG_ITERATOR!(),
28    doc: "An iterator over a snapshot of the environment variables of this process.",
29    @VarsOs as IterVarsOs,
30}
31reexport! { rust: std::env,
32    tag: crate::TAG_ERROR!(),
33    doc: "Returned from [`Env::var`][crate::Env#method.var].",
34    VarError
35}
36reexport! { rust: std::env,
37    tag: crate::TAG_ITERATOR!(),
38    doc: "An iterator that splits an environment variable into paths.",
39    @SplitPaths as IterSplitPaths,
40}
41reexport! { rust: std::env,
42    tag: crate::TAG_ERROR!(),
43    doc: "Returned from [Env::join_paths][crate::Env#method.join_paths].",
44    JoinPathsError,
45}
46
47/* core macros */
48
49reexport! { rust: core,
50    doc: "Optionally inspects an environment variable at compile time.",
51    option_env
52}
53
54// NOTE: the macro and the module have the same name
55//
56/// <span class='stab portability' title='re-exported from rust&#39;s `core`'>`core`</span>
57/// Inspects an environment variable at compile time.
58///
59#[doc = "*Re-exported from [`core::env`][macro@crate::_core::env]*."]
60#[doc = "\n\n---"]
61///
62/// The reason of the `_` suffix is to avoid conflicting with Rust's prelude
63/// when glob importing from this crate. Since this macro has the same name
64/// as its sibling module `core::env`, in order to be able to re-export
65/// only the macro we have to wrap it with our own.
66#[macro_export]
67#[cfg_attr(cargo_primary_package, doc(hidden))]
68macro_rules! env_ { ($($tt:tt)*) => { core::env![$($tt)*] } }
69#[doc(inline)]
70pub use env_;