I have a use-case where I'd like to perform some operations on the data being sent through an fd_write call on the host rather than sending it through to an underlying file descriptor. The existing fd_write call doesn't appear to offer the ability to work with the input data on the host.
What I think I want (and feel free to correct me if it isn't) is something that would convert the scatter gather IO vectors passed into fd_write to a u8 slice. I think combining dec_ciovec_slice and ciovec_to_host and flattening the resulting IO slices should do that. Would there be any interest in either exporting these functions or exporting a function that would use these two functions to return a slice of the data provided as input to fd_write?
I have a use-case where I'd like to perform some operations on the data being sent through an
fd_writecall on the host rather than sending it through to an underlying file descriptor. The existingfd_writecall doesn't appear to offer the ability to work with the input data on the host.What I think I want (and feel free to correct me if it isn't) is something that would convert the scatter gather IO vectors passed into
fd_writeto a u8 slice. I think combiningdec_ciovec_sliceandciovec_to_hostand flattening the resulting IO slices should do that. Would there be any interest in either exporting these functions or exporting a function that would use these two functions to return a slice of the data provided as input tofd_write?