File tree 26 files changed +96
-26
lines changed
26 files changed +96
-26
lines changed Original file line number Diff line number Diff line change 5
5
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6
6
7
7
use crate :: fs:: Metadata ;
8
+ use crate :: sealed:: Sealed ;
8
9
use crate :: sys_common:: AsInner ;
9
10
10
11
/// OS-specific extensions to [`fs::Metadata`].
11
12
///
12
13
/// [`fs::Metadata`]: crate::fs::Metadata
13
14
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
14
- pub trait MetadataExt {
15
+ pub trait MetadataExt : Sealed {
15
16
/// Returns the device ID on which this file resides.
16
17
///
17
18
/// # Examples
@@ -294,6 +295,8 @@ pub trait MetadataExt {
294
295
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
295
296
fn st_blocks ( & self ) -> u64 ;
296
297
}
298
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299
+ impl Sealed for Metadata { }
297
300
298
301
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299
302
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::android::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -59,6 +60,8 @@ pub trait MetadataExt {
59
60
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
60
61
fn st_blocks ( & self ) -> u64 ;
61
62
}
63
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
64
+ impl Sealed for Metadata { }
62
65
63
66
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
64
67
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::dragonfly::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -65,6 +66,8 @@ pub trait MetadataExt {
65
66
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
66
67
fn st_lspare ( & self ) -> u32 ;
67
68
}
69
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
70
+ impl Sealed for Metadata { }
68
71
69
72
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
70
73
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::emscripten::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -59,6 +60,8 @@ pub trait MetadataExt {
59
60
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
60
61
fn st_blocks ( & self ) -> u64 ;
61
62
}
63
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
64
+ impl Sealed for Metadata { }
62
65
63
66
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
64
67
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::espidf::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
15
16
#[ deprecated(
16
17
since = "1.8.0" ,
@@ -55,6 +56,8 @@ pub trait MetadataExt {
55
56
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
56
57
fn st_spare4 ( & self ) -> [ u32 ; 2 ] ;
57
58
}
59
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
60
+ impl Sealed for Metadata { }
58
61
59
62
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
60
63
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::freebsd::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -69,6 +70,8 @@ pub trait MetadataExt {
69
70
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
70
71
fn st_lspare ( & self ) -> u32 ;
71
72
}
73
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
74
+ impl Sealed for Metadata { }
72
75
73
76
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
74
77
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
/// OS-specific extensions to [`fs::Metadata`].
7
8
///
8
9
/// [`fs::Metadata`]: crate::fs::Metadata
9
10
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
10
- pub trait MetadataExt {
11
+ pub trait MetadataExt : Sealed {
11
12
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
12
13
fn st_dev ( & self ) -> u64 ;
13
14
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
@@ -41,6 +42,8 @@ pub trait MetadataExt {
41
42
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
42
43
fn st_blocks ( & self ) -> u64 ;
43
44
}
45
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
46
+ impl Sealed for Metadata { }
44
47
45
48
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
46
49
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::haiku::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -63,6 +64,8 @@ pub trait MetadataExt {
63
64
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
64
65
fn st_blocks ( & self ) -> u64 ;
65
66
}
67
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
68
+ impl Sealed for Metadata { }
66
69
67
70
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
68
71
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
/// OS-specific extensions to [`fs::Metadata`].
7
8
///
8
9
/// [`fs::Metadata`]: crate::fs::Metadata
9
10
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
10
- pub trait MetadataExt {
11
+ pub trait MetadataExt : Sealed {
11
12
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
12
13
fn st_dev ( & self ) -> u64 ;
13
14
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
@@ -41,6 +42,8 @@ pub trait MetadataExt {
41
42
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
42
43
fn st_blocks ( & self ) -> u64 ;
43
44
}
45
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
46
+ impl Sealed for Metadata { }
44
47
45
48
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
46
49
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 5
5
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6
6
7
7
use crate :: fs:: Metadata ;
8
+ use crate :: sealed:: Sealed ;
8
9
use crate :: sys_common:: AsInner ;
9
10
10
11
/// OS-specific extensions to [`fs::Metadata`].
11
12
///
12
13
/// [`fs::Metadata`]: crate::fs::Metadata
13
14
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
14
- pub trait MetadataExt {
15
+ pub trait MetadataExt : Sealed {
15
16
/// Returns the device ID on which this file resides.
16
17
///
17
18
/// # Examples
@@ -294,6 +295,8 @@ pub trait MetadataExt {
294
295
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
295
296
fn st_blocks ( & self ) -> u64 ;
296
297
}
298
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299
+ impl Sealed for Metadata { }
297
300
298
301
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299
302
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::illumos::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -58,6 +59,8 @@ pub trait MetadataExt {
58
59
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
59
60
fn st_blocks ( & self ) -> u64 ;
60
61
}
62
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
63
+ impl Sealed for Metadata { }
61
64
62
65
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
63
66
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use super::raw;
12
12
///
13
13
/// [`fs::Metadata`]: crate::fs::Metadata
14
14
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
15
- pub trait MetadataExt {
15
+ pub trait MetadataExt : Sealed {
16
16
/// Gain a reference to the underlying `stat` structure which contains
17
17
/// the raw information returned by the OS.
18
18
///
@@ -71,6 +71,8 @@ pub trait MetadataExt {
71
71
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
72
72
fn st_lspare ( & self ) -> u32 ;
73
73
}
74
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
75
+ impl Sealed for Metadata { }
74
76
75
77
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
76
78
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 5
5
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6
6
7
7
use crate :: fs:: Metadata ;
8
+ use crate :: sealed:: Sealed ;
8
9
use crate :: sys_common:: AsInner ;
9
10
10
11
#[ allow( deprecated) ]
@@ -14,7 +15,7 @@ use crate::os::l4re::raw;
14
15
///
15
16
/// [`fs::Metadata`]: crate::fs::Metadata
16
17
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
17
- pub trait MetadataExt {
18
+ pub trait MetadataExt : Sealed {
18
19
/// Gain a reference to the underlying `stat` structure which contains
19
20
/// the raw information returned by the OS.
20
21
///
@@ -324,6 +325,8 @@ pub trait MetadataExt {
324
325
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
325
326
fn st_blocks ( & self ) -> u64 ;
326
327
}
328
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
329
+ impl Sealed for Metadata { }
327
330
328
331
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
329
332
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 5
5
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6
6
7
7
use crate :: fs:: Metadata ;
8
+ use crate :: sealed:: Sealed ;
8
9
use crate :: sys_common:: AsInner ;
9
10
10
11
#[ allow( deprecated) ]
@@ -14,7 +15,7 @@ use crate::os::linux::raw;
14
15
///
15
16
/// [`fs::Metadata`]: crate::fs::Metadata
16
17
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
17
- pub trait MetadataExt {
18
+ pub trait MetadataExt : Sealed {
18
19
/// Gain a reference to the underlying `stat` structure which contains
19
20
/// the raw information returned by the OS.
20
21
///
@@ -324,6 +325,8 @@ pub trait MetadataExt {
324
325
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
325
326
fn st_blocks ( & self ) -> u64 ;
326
327
}
328
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
329
+ impl Sealed for Metadata { }
327
330
328
331
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
329
332
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use crate::os::macos::raw;
12
12
///
13
13
/// [`fs::Metadata`]: crate::fs::Metadata
14
14
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
15
- pub trait MetadataExt {
15
+ pub trait MetadataExt : Sealed {
16
16
/// Gain a reference to the underlying `stat` structure which contains
17
17
/// the raw information returned by the OS.
18
18
///
@@ -73,6 +73,8 @@ pub trait MetadataExt {
73
73
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
74
74
fn st_qspare ( & self ) -> [ u64 ; 2 ] ;
75
75
}
76
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
77
+ impl Sealed for Metadata { }
76
78
77
79
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
78
80
impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 1
1
#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
2
2
3
3
use crate :: fs:: Metadata ;
4
+ use crate :: sealed:: Sealed ;
4
5
use crate :: sys_common:: AsInner ;
5
6
6
7
#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::netbsd::raw;
10
11
///
11
12
/// [`fs::Metadata`]: crate::fs::Metadata
12
13
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13
- pub trait MetadataExt {
14
+ pub trait MetadataExt : Sealed {
14
15
/// Gain a reference to the underlying `stat` structure which contains
15
16
/// the raw information returned by the OS.
16
17
///
@@ -67,6 +68,8 @@ pub trait MetadataExt {
67
68
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
68
69
fn st_gen ( & self ) -> u32 ;
69
70
}
71
+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
72
+ impl Sealed for Metadata { }
70
73
71
74
#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
72
75
impl MetadataExt for Metadata {
You can’t perform that action at this time.
0 commit comments