Skip to content

Commit ee4a344

Browse files
committed
feat(access): deprecate {Access,Readable}::RestrictShared
Signed-off-by: Martin Kröning <[email protected]>
1 parent e4c858d commit ee4a344

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/access.rs

+3
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ restrict_impl!(WriteOnly, NoAccess, NoAccess);
4848
/// Sealed trait that is implemented for the types in this module.
4949
pub trait Access: Copy + Default + private::Sealed {
5050
/// Reduced access level to safely share the corresponding value.
51+
#[deprecated = "replaced by `RestrictAccess<ReadOnly>::Restricted`"]
5152
type RestrictShared: Access;
5253
}
5354

5455
/// Helper trait that is implemented by [`ReadWrite`] and [`ReadOnly`].
5556
pub trait Readable: Copy + Default + private::Sealed {
5657
/// Reduced access level to safely share the corresponding value.
58+
#[deprecated = "replaced by `RestrictAccess<ReadOnly>::Restricted`"]
5759
type RestrictShared: Readable + Access;
5860
}
5961

@@ -67,6 +69,7 @@ impl<T> Access for T
6769
where
6870
T: Readable + Default + Copy,
6971
{
72+
#[allow(deprecated)]
7073
type RestrictShared = <T as Readable>::RestrictShared;
7174
}
7275

0 commit comments

Comments
 (0)