10
10
11
11
//! Inspection and manipulation of the process's environment.
12
12
//!
13
- //! This module contains methods to inspect various aspects such as
13
+ //! This module contains functions to inspect various aspects such as
14
14
//! environment variables, process arguments, the current directory, and various
15
15
//! other important directories.
16
16
@@ -68,15 +68,17 @@ pub fn set_current_dir<P: AsRef<Path>>(p: P) -> io::Result<()> {
68
68
69
69
/// An iterator over a snapshot of the environment variables of this process.
70
70
///
71
- /// This iterator is created through `std::env::vars()` and yields `(String,
72
- /// String)` pairs.
71
+ /// This structure is created through the [`std::env::vars`] function.
72
+ ///
73
+ /// [`std::env::vars`]: fn.vars.html
73
74
#[ stable( feature = "env" , since = "1.0.0" ) ]
74
75
pub struct Vars { inner : VarsOs }
75
76
76
77
/// An iterator over a snapshot of the environment variables of this process.
77
78
///
78
- /// This iterator is created through `std::env::vars_os()` and yields
79
- /// `(OsString, OsString)` pairs.
79
+ /// This structure is created through the [`std::env::vars_os`] function.
80
+ ///
81
+ /// [`std::env::vars_os`]: fn.vars_os.html
80
82
#[ stable( feature = "env" , since = "1.0.0" ) ]
81
83
pub struct VarsOs { inner : os_imp:: Env }
82
84
@@ -218,7 +220,9 @@ fn _var_os(key: &OsStr) -> Option<OsString> {
218
220
} )
219
221
}
220
222
221
- /// Possible errors from the `env::var` method.
223
+ /// Possible errors from the [`env::var`] function.
224
+ ///
225
+ /// [env::var]: fn.var.html
222
226
#[ derive( Debug , PartialEq , Eq , Clone ) ]
223
227
#[ stable( feature = "env" , since = "1.0.0" ) ]
224
228
pub enum VarError {
@@ -570,7 +574,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
570
574
/// An iterator over the arguments of a process, yielding a [`String`] value
571
575
/// for each argument.
572
576
///
573
- /// This structure is created through the [`std::env::args`] method .
577
+ /// This structure is created through the [`std::env::args`] function .
574
578
///
575
579
/// [`String`]: ../string/struct.String.html
576
580
/// [`std::env::args`]: ./fn.args.html
@@ -580,7 +584,7 @@ pub struct Args { inner: ArgsOs }
580
584
/// An iterator over the arguments of a process, yielding an [`OsString`] value
581
585
/// for each argument.
582
586
///
583
- /// This structure is created through the [`std::env::args_os`] method .
587
+ /// This structure is created through the [`std::env::args_os`] function .
584
588
///
585
589
/// [`OsString`]: ../ffi/struct.OsString.html
586
590
/// [`std::env::args_os`]: ./fn.args_os.html
0 commit comments