pub(crate) async fn find_first_newline(
object_store: &Arc<dyn ObjectStore>,
location: &Path,
start: u64,
end: u64,
newline: u8,
) -> Result<u64>Expand description
Asynchronously finds the position of the first newline character in a specified byte range within an object, such as a file, in an object store.
This function scans the contents of the object starting from the specified start position
up to the end position, looking for the first occurrence of a newline character.
It returns the position of the first newline relative to the start of the range.
Returns a Result wrapping a usize that represents the position of the first newline character found within the specified range. If no newline is found, it returns the length of the scanned data, effectively indicating the end of the range.
The function returns an Error if any issues arise while reading from the object store or processing the data stream.