87
87
#![ deny( missing_doc) ]
88
88
#![ deny( deprecated_owned_vector) ]
89
89
90
+ #![ allow( visible_private_types) ] // NOTE: remove after a stage0 snap
91
+
90
92
#[ cfg( test) ] #[ phase( syntax, link) ] extern crate log;
91
93
92
94
use std:: cmp:: Eq ;
@@ -130,31 +132,31 @@ pub enum Occur {
130
132
#[ deriving( Clone , Eq ) ]
131
133
pub struct Opt {
132
134
/// Name of the option
133
- name : Name ,
135
+ pub name : Name ,
134
136
/// Whether it has an argument
135
- hasarg : HasArg ,
137
+ pub hasarg : HasArg ,
136
138
/// How often it can occur
137
- occur : Occur ,
139
+ pub occur : Occur ,
138
140
/// Which options it aliases
139
- priv aliases : Vec < Opt > ,
141
+ pub aliases : Vec < Opt > ,
140
142
}
141
143
142
144
/// One group of options, e.g., both -h and --help, along with
143
145
/// their shared description and properties.
144
146
#[ deriving( Clone , Eq ) ]
145
147
pub struct OptGroup {
146
148
/// Short Name of the `OptGroup`
147
- short_name : ~str ,
149
+ pub short_name : ~str ,
148
150
/// Long Name of the `OptGroup`
149
- long_name : ~str ,
151
+ pub long_name : ~str ,
150
152
/// Hint
151
- hint : ~str ,
153
+ pub hint : ~str ,
152
154
/// Description
153
- desc : ~str ,
155
+ pub desc : ~str ,
154
156
/// Whether it has an argument
155
- hasarg : HasArg ,
157
+ pub hasarg : HasArg ,
156
158
/// How often it can occur
157
- occur : Occur
159
+ pub occur : Occur
158
160
}
159
161
160
162
/// Describes wether an option is given at all or has a value.
@@ -169,11 +171,12 @@ enum Optval {
169
171
#[ deriving( Clone , Eq ) ]
170
172
pub struct Matches {
171
173
/// Options that matched
172
- priv opts : Vec < Opt > ,
174
+ opts : Vec < Opt > ,
173
175
/// Values of the Options that matched
174
- priv vals : Vec < Vec < Optval > > ,
176
+ vals : Vec < Vec < Optval > > ,
175
177
/// Free string fragments
176
- free : Vec < ~str > }
178
+ pub free : Vec < ~str > ,
179
+ }
177
180
178
181
/// The type returned when the command line does not conform to the
179
182
/// expected format. Call the `to_err_msg` method to retrieve the
0 commit comments