1use ref_cast::RefCastCustom;
2use ref_cast::ref_cast_custom;
3
4use crate::ll;
5use crate::ll::fuse_abi::fuse_in_header;
6
7#[derive(Debug, RefCastCustom)]
9#[repr(transparent)]
10pub struct Request {
11 header: fuse_in_header,
12}
13
14impl Request {
15 #[ref_cast_custom]
16 pub(crate) fn ref_cast(header: &fuse_in_header) -> &Request;
17
18 #[inline]
20 pub fn unique(&self) -> ll::RequestId {
21 ll::RequestId(self.header.unique)
22 }
23
24 #[inline]
26 pub fn uid(&self) -> u32 {
27 self.header.uid
28 }
29
30 #[inline]
32 pub fn gid(&self) -> u32 {
33 self.header.gid
34 }
35
36 #[inline]
38 pub fn pid(&self) -> u32 {
39 self.header.pid
40 }
41}