Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify a read buffer initial capacity when creating ByteStream from a file #1238

Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Specify the unit to use for PathBodyBuilder.with_file_size
tanguylebarzic committed Apr 11, 2022
commit b38a34ad15b85d7fccbf8cd15c6e41bac93e39f2
Original file line number Diff line number Diff line change
@@ -85,8 +85,9 @@ impl PathBodyBuilder {
}
}

/// Specify the length of the file to read. If not used, [byte_stream](PathBodyBuilder::byte_stream)
/// will require an extra call to query the file's metadata.
/// Specify the length of the file to read (in bytes).
///
/// If not used, [byte_stream](PathBodyBuilder::byte_stream) will require an extra call to query the file's metadata.
///
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
///

pub fn with_file_size(mut self, file_size: u64) -> Self {
self.file_size = Some(file_size);