Lines Matching refs:State
39 type State;
54 ptr: *mut Self::State,
65 unsafe fn lock(ptr: *mut Self::State) -> Self::GuardState;
72 unsafe fn try_lock(ptr: *mut Self::State) -> Option<Self::GuardState>;
79 unsafe fn unlock(ptr: *mut Self::State, guard_state: &Self::GuardState);
87 unsafe fn relock(ptr: *mut Self::State, guard_state: &mut Self::GuardState) {
97 unsafe fn assert_is_held(ptr: *mut Self::State);
109 state: Opaque<B::State>,
155 /// The caller promises that `ptr` points to a valid initialised instance of [`State`] during
158 /// [`State`]: Backend::State
160 pub unsafe fn from_raw<'a>(ptr: *mut B::State) -> &'a Self {
162 // - By the safety contract `ptr` must point to a valid initialised instance of `B::State`
166 // `B::State`.