pub fn new(unique: u64, res: Result<T, c_int>) -> Self {
        let payload_len = match res {
            Ok(ref payload) => payload.as_io_slice().len(),
            Err(_) => 0,
        };
        let len = mem::size_of::<fuse_out_header>() + payload_len;
        let error = match res {
            Ok(_) => 0,
            Err(err) => -err,
        };
        let header = fuse_out_header {
            len: len as u32,
            error: error as i32,
            unique,
        };
        Self {
            header,
            payload: res.ok(),
        }
    }
/// Create a new reply for the given request using the given payload.
// FIXME: this should consume a `Request` instead of passing the unique id
Create a new reply for the given request using the given payload.
FIXME: this should consume a `Request` instead of passing the unique id
Create a new reply for the given request using the given payload . FIXME : this should consume a ` Request ` instead of passing the unique id
pub fn new(unique: u64, res: Result<T, c_int>) -> Self {
        let payload_len = match res {
            Ok(ref payload) => payload.as_io_slice().len(),
            Err(_) => 0,
        };
        let len = mem::size_of::<fuse_out_header>() + payload_len;
        let error = match res {
            Ok(_) => 0,
            Err(err) => -err,
        };
        let header = fuse_out_header {
            len: len as u32,
            error: error as i32,
            unique,
        };
        Self {
            header,
            payload: res.ok(),
        }
    }
pub fn new ( unique : u64 , res : Result < T , c_int > ) -> Self { let payload_len = match res { Ok ( ref payload ) => payload . as_io_slice ( ) . len ( ) , Err ( _ ) => 0 , } ; let len = mem :: size_of :: < fuse_out_header > ( ) + payload_len ; let error = match res { Ok ( _ ) => 0 , Err ( err ) => - err , } ; let header = fuse_out_header { len : len as u32 , error : error as i32 , unique , } ; Self { header , payload : res . ok ( ) , } }
Create a new reply for the given request using the given payload.
Create a new reply for the given request using the given payload .
unique
u64
res
Result<T, c_int>
unique
u64
res
Result<T, c_int>