@@ -167,7 +167,7 @@ impl<'a, T> Iterator for AncillaryDataIter<'a, T> {
167
167
168
168
/// Unix credential.
169
169
#[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
170
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
170
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
171
171
#[ derive( Clone ) ]
172
172
pub struct SocketCred ( libc:: ucred ) ;
173
173
@@ -176,43 +176,43 @@ impl SocketCred {
176
176
/// Create a Unix credential struct.
177
177
///
178
178
/// PID, UID and GID is set to 0.
179
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
179
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
180
180
pub fn new ( ) -> SocketCred {
181
181
SocketCred ( libc:: ucred { pid : 0 , uid : 0 , gid : 0 } )
182
182
}
183
183
184
184
/// Set the PID.
185
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
185
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
186
186
pub fn set_pid ( & mut self , pid : pid_t ) {
187
187
self . 0 . pid = pid;
188
188
}
189
189
190
190
/// Get the current PID.
191
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
191
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
192
192
pub fn get_pid ( & self ) -> pid_t {
193
193
self . 0 . pid
194
194
}
195
195
196
196
/// Set the UID.
197
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
197
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
198
198
pub fn set_uid ( & mut self , uid : uid_t ) {
199
199
self . 0 . uid = uid;
200
200
}
201
201
202
202
/// Get the current UID.
203
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
203
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
204
204
pub fn get_uid ( & self ) -> uid_t {
205
205
self . 0 . uid
206
206
}
207
207
208
208
/// Set the GID.
209
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
209
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
210
210
pub fn set_gid ( & mut self , gid : gid_t ) {
211
211
self . 0 . gid = gid;
212
212
}
213
213
214
214
/// Get the current GID.
215
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
215
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
216
216
pub fn get_gid ( & self ) -> gid_t {
217
217
self . 0 . gid
218
218
}
@@ -221,10 +221,10 @@ impl SocketCred {
221
221
/// This control message contains file descriptors.
222
222
///
223
223
/// The level is equal to `SOL_SOCKET` and the type is equal to `SCM_RIGHTS`.
224
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
224
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
225
225
pub struct ScmRights < ' a > ( AncillaryDataIter < ' a , RawFd > ) ;
226
226
227
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
227
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
228
228
impl < ' a > Iterator for ScmRights < ' a > {
229
229
type Item = RawFd ;
230
230
@@ -237,11 +237,11 @@ impl<'a> Iterator for ScmRights<'a> {
237
237
///
238
238
/// The level is equal to `SOL_SOCKET` and the type is equal to `SCM_CREDENTIALS` or `SCM_CREDS`.
239
239
#[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
240
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
240
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
241
241
pub struct ScmCredentials < ' a > ( AncillaryDataIter < ' a , libc:: ucred > ) ;
242
242
243
243
#[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
244
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
244
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
245
245
impl < ' a > Iterator for ScmCredentials < ' a > {
246
246
type Item = SocketCred ;
247
247
@@ -253,13 +253,13 @@ impl<'a> Iterator for ScmCredentials<'a> {
253
253
/// The error type which is returned from parsing the type a control message.
254
254
#[ non_exhaustive]
255
255
#[ derive( Debug ) ]
256
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
256
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
257
257
pub enum AncillaryError {
258
258
Unknown { cmsg_level : i32 , cmsg_type : i32 } ,
259
259
}
260
260
261
261
/// This enum represent one control message of variable type.
262
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
262
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
263
263
pub enum AncillaryData < ' a > {
264
264
ScmRights ( ScmRights < ' a > ) ,
265
265
#[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
@@ -321,13 +321,13 @@ impl<'a> AncillaryData<'a> {
321
321
}
322
322
323
323
/// This struct is used to iterate through the control messages.
324
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
324
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
325
325
pub struct Messages < ' a > {
326
326
buffer : & ' a [ u8 ] ,
327
327
current : Option < & ' a libc:: cmsghdr > ,
328
328
}
329
329
330
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
330
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
331
331
impl < ' a > Iterator for Messages < ' a > {
332
332
type Item = Result < AncillaryData < ' a > , AncillaryError > ;
333
333
@@ -386,7 +386,7 @@ impl<'a> Iterator for Messages<'a> {
386
386
/// Ok(())
387
387
/// }
388
388
/// ```
389
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
389
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
390
390
#[ derive( Debug ) ]
391
391
pub struct SocketAncillary < ' a > {
392
392
buffer : & ' a mut [ u8 ] ,
@@ -406,25 +406,25 @@ impl<'a> SocketAncillary<'a> {
406
406
/// let mut ancillary_buffer = [0; 128];
407
407
/// let mut ancillary = SocketAncillary::new(&mut ancillary_buffer[..]);
408
408
/// ```
409
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
409
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
410
410
pub fn new ( buffer : & ' a mut [ u8 ] ) -> Self {
411
411
SocketAncillary { buffer, length : 0 , truncated : false }
412
412
}
413
413
414
414
/// Returns the capacity of the buffer.
415
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
415
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
416
416
pub fn capacity ( & self ) -> usize {
417
417
self . buffer . len ( )
418
418
}
419
419
420
420
/// Returns the number of used bytes.
421
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
421
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
422
422
pub fn len ( & self ) -> usize {
423
423
self . length
424
424
}
425
425
426
426
/// Returns the iterator of the control messages.
427
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
427
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
428
428
pub fn messages ( & self ) -> Messages < ' _ > {
429
429
Messages { buffer : & self . buffer [ ..self . length ] , current : None }
430
430
}
@@ -452,7 +452,7 @@ impl<'a> SocketAncillary<'a> {
452
452
/// Ok(())
453
453
/// }
454
454
/// ```
455
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
455
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
456
456
pub fn truncated ( & self ) -> bool {
457
457
self . truncated
458
458
}
@@ -485,7 +485,7 @@ impl<'a> SocketAncillary<'a> {
485
485
/// Ok(())
486
486
/// }
487
487
/// ```
488
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
488
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
489
489
pub fn add_fds ( & mut self , fds : & [ RawFd ] ) -> bool {
490
490
self . truncated = false ;
491
491
add_to_ancillary_data (
@@ -505,7 +505,7 @@ impl<'a> SocketAncillary<'a> {
505
505
/// and type `SCM_CREDENTIALS` or `SCM_CREDS`.
506
506
///
507
507
#[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
508
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
508
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
509
509
pub fn add_creds ( & mut self , creds : & [ SocketCred ] ) -> bool {
510
510
self . truncated = false ;
511
511
add_to_ancillary_data (
@@ -559,7 +559,7 @@ impl<'a> SocketAncillary<'a> {
559
559
/// Ok(())
560
560
/// }
561
561
/// ```
562
- #[ unstable( feature = "unix_socket_ancillary_data" , issue = "none " ) ]
562
+ #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915 " ) ]
563
563
pub fn clear ( & mut self ) {
564
564
self . length = 0 ;
565
565
self . truncated = false ;
0 commit comments