Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Jan 3, 2024
1 parent 5374c2f commit 2e99ba9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions object_store/src/client/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,16 @@ impl<T: GetClient> GetClientExt for T {
}

struct ContentRange {
/// The range of the object returned
range: Range<usize>,
/// The total size of the object being requested
size: usize,
}

impl ContentRange {
/// Parse a content range of the form `bytes <range-start>-<range-end>/<size>`
///
/// <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range>
fn from_str(s: &str) -> Option<Self> {
let rem = s.trim().strip_prefix("bytes ")?;
let (range, size) = rem.split_once('/')?;
Expand Down

0 comments on commit 2e99ba9

Please sign in to comment.