We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Copyable
RestrictAccess
1 parent ee4a344 commit a9d9665Copy full SHA for a9d9665
src/access.rs
@@ -64,6 +64,7 @@ pub trait Writable: Access + private::Sealed {}
64
65
/// Implemented for access types that permit copying of `VolatileRef`.
66
pub trait Copyable: private::Sealed {}
67
+impl<A: RestrictAccess<ReadOnly, Restricted = Self>> Copyable for A {}
68
69
impl<T> Access for T
70
where
@@ -87,7 +88,6 @@ pub struct ReadOnly;
87
88
impl Readable for ReadOnly {
89
type RestrictShared = ReadOnly;
90
}
-impl Copyable for ReadOnly {}
91
92
/// Zero-sized marker type for allowing only write access.
93
#[derive(Debug, Default, Copy, Clone)]
@@ -103,7 +103,6 @@ pub struct NoAccess;
103
impl Access for NoAccess {
104
type RestrictShared = NoAccess;
105
106
-impl Copyable for NoAccess {}
107
108
mod private {
109
pub trait Sealed {}
0 commit comments