Lines Matching full:safety
27 /// # Safety
49 /// # Safety
61 /// # Safety
69 /// # Safety
76 /// # Safety
83 /// # Safety
88 // SAFETY: The safety requirements ensure that the lock is initialised. in relock()
94 /// # Safety
121 // SAFETY: `Lock` can be transferred across thread boundaries iff the data it protects can.
124 // SAFETY: `Lock` serialises the interior mutability it provides, so it is `Sync` as long as the
134 // SAFETY: `slot` is valid while the closure is called and both `name` and `key` have in new()
148 /// # Safety
155 // SAFETY: in from_raw()
156 // - By the safety contract `ptr` must point to a valid initialised instance of `B::State` in from_raw()
168 // SAFETY: The constructor of the type calls `init`, so the existence of the object proves in lock()
171 // SAFETY: The lock was just acquired. in lock()
179 // SAFETY: The constructor of the type calls `init`, so the existence of the object proves in try_lock()
197 // SAFETY: `Guard` is sync when the data protected by the lock is also sync.
232 // SAFETY: The caller owns the lock, so it is safe to unlock it. in do_unlocked()
236 // SAFETY: The lock was just unlocked above and is being relocked now. in do_unlocked()
247 // SAFETY: The caller owns the lock, so it is safe to deref the protected data. in deref()
254 // SAFETY: The caller owns the lock, so it is safe to deref the protected data. in deref_mut()
261 // SAFETY: The caller owns the lock, so it is safe to unlock it. in drop()
269 /// # Safety
273 // SAFETY: The caller can only hold the lock if `Backend::init` has already been called. in new()