pub struct UploadStream<R> {
pub reader: R,
pub content_length: Option<u64>,
}Expand description
Streamed body accepted by deprecated raw upload methods.
Fields§
§reader: RStreamed upload data.
content_length: Option<u64>Known stream length, when available.
Implementations§
Source§impl<R> UploadStream<R>
impl<R> UploadStream<R>
Sourcepub const fn new(reader: R) -> UploadStream<R>
pub const fn new(reader: R) -> UploadStream<R>
Create a streamed upload body without a known content length.
Sourcepub const fn with_content_length(self, content_length: u64) -> UploadStream<R>
pub const fn with_content_length(self, content_length: u64) -> UploadStream<R>
Attach a known content length.
Auto Trait Implementations§
impl<R> Freeze for UploadStream<R>where
R: Freeze,
impl<R> RefUnwindSafe for UploadStream<R>where
R: RefUnwindSafe,
impl<R> Send for UploadStream<R>where
R: Send,
impl<R> Sync for UploadStream<R>where
R: Sync,
impl<R> Unpin for UploadStream<R>where
R: Unpin,
impl<R> UnsafeUnpin for UploadStream<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for UploadStream<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more