async_fuser/ll/reply_async/
getattr.rs1use std::time::Duration;
5
6use crate::FileAttr;
7use crate::ll::ResponseStruct;
8use crate::ll::ioslice_concat::IosliceConcat;
9use crate::ll::reply::Attr;
10use crate::ll::reply::Response;
11
12#[derive(Debug)]
14pub struct GetAttrResponse {
15 ttl: Duration,
16 attr: FileAttr,
17}
18
19impl GetAttrResponse {
20 pub fn new(ttl: Duration, attr: FileAttr) -> Self {
22 Self { ttl, attr }
23 }
24}
25
26impl Response for GetAttrResponse {
27 fn payload(&self) -> impl IosliceConcat {
28 ResponseStruct::new_attr(&self.ttl, &Attr::from(self.attr))
29 }
30}