Lines Matching defs:Request
22 /// 1. Request is owned by block layer (refcount 0).
23 /// 2. Request is owned by driver but with zero [`ARef`]s in existence
25 /// 3. Request is owned by driver with exactly one [`ARef`] in existence
27 /// 4. Request is owned by driver with more than one [`ARef`] in existence
56 pub struct Request<T>(Opaque<bindings::request>, PhantomData<T>);
58 impl<T: Operations> Request<T> {
59 /// Create an [`ARef<Request>`] from a [`struct request`] pointer.
65 /// * The type invariants for [`Request`] must hold for the pointee of `ptr`.
93 /// [`Request`].
153 let this = unsafe { Request::aref_from_raw(ptr) };
219 // SAFETY: Exclusive access is thread-safe for `Request`. `Request` has no `&mut
222 unsafe impl<T: Operations> Send for Request<T> {}
224 // SAFETY: Shared access is thread-safe for `Request`. `&self` methods that
226 unsafe impl<T: Operations> Sync for Request<T> {}
228 // SAFETY: All instances of `Request<T>` are reference counted. This
232 unsafe impl<T: Operations> AlwaysRefCounted for Request<T> {
241 // SAFETY: The type invariant of `Request` guarantees that the private
250 panic!("Request reached refcount zero in Rust abstractions");