(&self, start: u64, length: usize)
| 209 | } |
| 210 | |
| 211 | fn get_bytes(&self, start: u64, length: usize) -> parquet::errors::Result<Bytes> { |
| 212 | let start = usize::cast_from(start); |
| 213 | let mut buf = self.clone(); |
| 214 | if start > buf.remaining() { |
| 215 | return Err(ParquetError::EOF(format!( |
| 216 | "seeking {start} bytes ahead, but only {} remaining", |
| 217 | buf.remaining() |
| 218 | ))); |
| 219 | } |
| 220 | buf.advance(start); |
| 221 | if length > buf.remaining() { |
| 222 | return Err(ParquetError::EOF(format!( |
| 223 | "copying {length} bytes, but only {} remaining", |
| 224 | buf.remaining() |
| 225 | ))); |
| 226 | } |
| 227 | let bytes = buf.copy_to_bytes(length); |
| 228 | Ok(bytes) |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | impl From<Bytes> for SegmentedBytes { |
nothing calls this directly
no test coverage detected