(&self, buf: &[u8])
| 174 | |
| 175 | impl CustomOutputStreamInner { |
| 176 | pub fn raw_write(&self, buf: &[u8]) -> io::Result<usize> { |
| 177 | let wrote = (self.callback)(self.foreign_data.data, buf.as_ptr(), buf.len()); |
| 178 | |
| 179 | if wrote >= 0 { |
| 180 | Ok(wrote as _) |
| 181 | } else { |
| 182 | Err(io::Error::from_raw_os_error(wrote.abs() as _)) |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | #[derive(Clone)] |
no test coverage detected