@@ -129,7 +129,9 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
129
129
// Windows Prefixes
130
130
////////////////////////////////////////////////////////////////////////////////
131
131
132
- /// Path prefixes (Windows only).
132
+ /// Path prefixes (Redox and Windows only).
133
+ ///
134
+ /// Redox uses schemes like `scheme:reference` to identify different I/O systems
133
135
///
134
136
/// Windows uses a variety of path styles, including references to drive
135
137
/// volumes (like `C:`), network shared folders (like `\\server\share`) and
@@ -139,6 +141,10 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
139
141
#[ derive( Copy , Clone , Debug , Hash , PartialOrd , Ord , PartialEq , Eq ) ]
140
142
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
141
143
pub enum Prefix < ' a > {
144
+ /// Prefix `scheme:`, where `scheme` is the component stored
145
+ #[ unstable( feature="redox_prefix" , issue="0" ) ]
146
+ Scheme ( & ' a OsStr ) ,
147
+
142
148
/// Prefix `\\?\`, together with the given component immediately following it.
143
149
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
144
150
Verbatim ( #[ stable( feature = "rust1" , since = "1.0.0" ) ] & ' a OsStr ) ,
@@ -178,6 +184,7 @@ impl<'a> Prefix<'a> {
178
184
os_str_as_u8_slice ( s) . len ( )
179
185
}
180
186
match * self {
187
+ Scheme ( x) => os_str_len ( x) + 1 ,
181
188
Verbatim ( x) => 4 + os_str_len ( x) ,
182
189
VerbatimUNC ( x, y) => {
183
190
8 + os_str_len ( x) +
0 commit comments