Skip to main content

async_fuser/ll/reply_async/
write.rs

1//! Response data implementation of [`crate::AsyncFilesystem::write`] operation to
2//! send to the kernel
3
4use crate::ll::ResponseStruct;
5use crate::ll::ioslice_concat::IosliceConcat;
6use crate::ll::reply::Response;
7
8/// Response data from [`crate::AsyncFilesystem::write`] operation
9#[derive(Debug)]
10pub struct WriteResponse {
11    size: u32,
12}
13
14impl WriteResponse {
15    /// Creates a `WriteResponse` object
16    pub fn new(size: u32) -> Self {
17        Self { size }
18    }
19}
20
21impl Response for WriteResponse {
22    fn payload(&self) -> impl IosliceConcat {
23        ResponseStruct::new_write(self.size)
24    }
25}