Lines Matching full:safety

29 /// # Safety
51 /// # Safety
63 /// # Safety
71 /// # Safety
78 /// # Safety
85 /// # Safety
90 // SAFETY: The safety requirements ensure that the lock is initialised. in relock()
96 /// # Safety
123 // SAFETY: `Lock` can be transferred across thread boundaries iff the data it protects can.
126 // SAFETY: `Lock` serialises the interior mutability it provides, so it is `Sync` as long as the
136 // SAFETY: `slot` is valid while the closure is called and both `name` and `key` have in new()
150 /// # Safety
157 // SAFETY: in from_raw()
158 // - By the safety contract `ptr` must point to a valid initialised instance of `B::State` in from_raw()
170 // SAFETY: The constructor of the type calls `init`, so the existence of the object proves in lock()
173 // SAFETY: The lock was just acquired. in lock()
181 // SAFETY: The constructor of the type calls `init`, so the existence of the object proves in try_lock()
199 // SAFETY: `Guard` is sync when the data protected by the lock is also sync.
204 // SAFETY: The caller owns the lock, so it is safe to unlock it. in do_unlocked()
208 // SAFETY: The lock was just unlocked above and is being relocked now. in do_unlocked()
219 // SAFETY: The caller owns the lock, so it is safe to deref the protected data. in deref()
226 // SAFETY: The caller owns the lock, so it is safe to deref the protected data. in deref_mut()
233 // SAFETY: The caller owns the lock, so it is safe to unlock it. in drop()
241 /// # Safety
245 // SAFETY: The caller can only hold the lock if `Backend::init` has already been called. in new()