File tree Expand file tree Collapse file tree 26 files changed +96
-26
lines changed Expand file tree Collapse file tree 26 files changed +96
-26
lines changed Original file line number Diff line number Diff line change 55#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
66
77use crate :: fs:: Metadata ;
8+ use crate :: sealed:: Sealed ;
89use crate :: sys_common:: AsInner ;
910
1011/// OS-specific extensions to [`fs::Metadata`].
1112///
1213/// [`fs::Metadata`]: crate::fs::Metadata
1314#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
14- pub trait MetadataExt {
15+ pub trait MetadataExt : Sealed {
1516 /// Returns the device ID on which this file resides.
1617 ///
1718 /// # Examples
@@ -294,6 +295,8 @@ pub trait MetadataExt {
294295 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
295296 fn st_blocks ( & self ) -> u64 ;
296297}
298+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299+ impl Sealed for Metadata { }
297300
298301#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299302impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::android::raw;
1011///
1112/// [`fs::Metadata`]: crate::fs::Metadata
1213#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13- pub trait MetadataExt {
14+ pub trait MetadataExt : Sealed {
1415 /// Gain a reference to the underlying `stat` structure which contains
1516 /// the raw information returned by the OS.
1617 ///
@@ -59,6 +60,8 @@ pub trait MetadataExt {
5960 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6061 fn st_blocks ( & self ) -> u64 ;
6162}
63+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
64+ impl Sealed for Metadata { }
6265
6366#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6467impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::dragonfly::raw;
1011///
1112/// [`fs::Metadata`]: crate::fs::Metadata
1213#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13- pub trait MetadataExt {
14+ pub trait MetadataExt : Sealed {
1415 /// Gain a reference to the underlying `stat` structure which contains
1516 /// the raw information returned by the OS.
1617 ///
@@ -65,6 +66,8 @@ pub trait MetadataExt {
6566 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6667 fn st_lspare ( & self ) -> u32 ;
6768}
69+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
70+ impl Sealed for Metadata { }
6871
6972#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
7073impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::emscripten::raw;
1011///
1112/// [`fs::Metadata`]: crate::fs::Metadata
1213#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13- pub trait MetadataExt {
14+ pub trait MetadataExt : Sealed {
1415 /// Gain a reference to the underlying `stat` structure which contains
1516 /// the raw information returned by the OS.
1617 ///
@@ -59,6 +60,8 @@ pub trait MetadataExt {
5960 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6061 fn st_blocks ( & self ) -> u64 ;
6162}
63+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
64+ impl Sealed for Metadata { }
6265
6366#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6467impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::espidf::raw;
1011///
1112/// [`fs::Metadata`]: crate::fs::Metadata
1213#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13- pub trait MetadataExt {
14+ pub trait MetadataExt : Sealed {
1415 #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
1516 #[ deprecated(
1617 since = "1.8.0" ,
@@ -55,6 +56,8 @@ pub trait MetadataExt {
5556 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
5657 fn st_spare4 ( & self ) -> [ u32 ; 2 ] ;
5758}
59+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
60+ impl Sealed for Metadata { }
5861
5962#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6063impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::freebsd::raw;
1011///
1112/// [`fs::Metadata`]: crate::fs::Metadata
1213#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13- pub trait MetadataExt {
14+ pub trait MetadataExt : Sealed {
1415 /// Gain a reference to the underlying `stat` structure which contains
1516 /// the raw information returned by the OS.
1617 ///
@@ -69,6 +70,8 @@ pub trait MetadataExt {
6970 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
7071 fn st_lspare ( & self ) -> u32 ;
7172}
73+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
74+ impl Sealed for Metadata { }
7275
7376#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
7477impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67/// OS-specific extensions to [`fs::Metadata`].
78///
89/// [`fs::Metadata`]: crate::fs::Metadata
910#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
10- pub trait MetadataExt {
11+ pub trait MetadataExt : Sealed {
1112 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
1213 fn st_dev ( & self ) -> u64 ;
1314 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
@@ -41,6 +42,8 @@ pub trait MetadataExt {
4142 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4243 fn st_blocks ( & self ) -> u64 ;
4344}
45+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
46+ impl Sealed for Metadata { }
4447
4548#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
4649impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67#[ allow( deprecated) ]
@@ -10,7 +11,7 @@ use crate::os::haiku::raw;
1011///
1112/// [`fs::Metadata`]: crate::fs::Metadata
1213#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
13- pub trait MetadataExt {
14+ pub trait MetadataExt : Sealed {
1415 /// Gain a reference to the underlying `stat` structure which contains
1516 /// the raw information returned by the OS.
1617 ///
@@ -63,6 +64,8 @@ pub trait MetadataExt {
6364 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6465 fn st_blocks ( & self ) -> u64 ;
6566}
67+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
68+ impl Sealed for Metadata { }
6669
6770#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
6871impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 11#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
22
33use crate :: fs:: Metadata ;
4+ use crate :: sealed:: Sealed ;
45use crate :: sys_common:: AsInner ;
56
67/// OS-specific extensions to [`fs::Metadata`].
78///
89/// [`fs::Metadata`]: crate::fs::Metadata
910#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
10- pub trait MetadataExt {
11+ pub trait MetadataExt : Sealed {
1112 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
1213 fn st_dev ( & self ) -> u64 ;
1314 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
@@ -41,6 +42,8 @@ pub trait MetadataExt {
4142 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
4243 fn st_blocks ( & self ) -> u64 ;
4344}
45+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
46+ impl Sealed for Metadata { }
4447
4548#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
4649impl MetadataExt for Metadata {
Original file line number Diff line number Diff line change 55#![ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
66
77use crate :: fs:: Metadata ;
8+ use crate :: sealed:: Sealed ;
89use crate :: sys_common:: AsInner ;
910
1011/// OS-specific extensions to [`fs::Metadata`].
1112///
1213/// [`fs::Metadata`]: crate::fs::Metadata
1314#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
14- pub trait MetadataExt {
15+ pub trait MetadataExt : Sealed {
1516 /// Returns the device ID on which this file resides.
1617 ///
1718 /// # Examples
@@ -294,6 +295,8 @@ pub trait MetadataExt {
294295 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
295296 fn st_blocks ( & self ) -> u64 ;
296297}
298+ #[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299+ impl Sealed for Metadata { }
297300
298301#[ stable( feature = "metadata_ext" , since = "1.1.0" ) ]
299302impl MetadataExt for Metadata {
You can’t perform that action at this time.
0 commit comments