Lines Matching full:backend
16 /// The "backend" of a lock.
27 pub unsafe trait Backend { trait
50 /// Callers must ensure that [`Backend::init`] has been previously called.
65 /// Callers must ensure that `guard_state` comes from a previous call to [`Backend::lock`] (or
66 /// variant) that has been unlocked with [`Backend::unlock`] and will be relocked now.
76 /// [`Backend`] specified as the generic parameter `B`.
78 pub struct Lock<T: ?Sized, B: Backend> {
94 unsafe impl<T: ?Sized + Send, B: Backend> Send for Lock<T, B> {}
98 unsafe impl<T: ?Sized + Send, B: Backend> Sync for Lock<T, B> {}
100 impl<T, B: Backend> Lock<T, B> {
115 impl<T: ?Sized, B: Backend> Lock<T, B> {
128 /// Allows mutual exclusion primitives that implement the [`Backend`] trait to automatically unlock
132 pub struct Guard<'a, T: ?Sized, B: Backend> {
139 unsafe impl<T: Sync + ?Sized, B: Backend> Sync for Guard<'_, T, B> {}
141 impl<T: ?Sized, B: Backend> Guard<'_, T, B> {
154 impl<T: ?Sized, B: Backend> core::ops::Deref for Guard<'_, T, B> {
163 impl<T: ?Sized, B: Backend> core::ops::DerefMut for Guard<'_, T, B> {
170 impl<T: ?Sized, B: Backend> Drop for Guard<'_, T, B> {
177 impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> {