Struct google_workflows1::client::MultiPartReader
source · [−]pub struct MultiPartReader<'a> { /* private fields */ }
Expand description
Provides a Read
interface that converts multiple parts into the protocol
identified by RFC2387.
Note: This implementation is just as rich as it needs to be to perform uploads
to google APIs, and might not be a fully-featured implementation.
Implementations
sourceimpl<'a> MultiPartReader<'a>
impl<'a> MultiPartReader<'a>
sourcepub fn reserve_exact(&mut self, cap: usize)
pub fn reserve_exact(&mut self, cap: usize)
Reserve memory for exactly the given amount of parts
sourcepub fn add_part(
&mut self,
reader: &'a mut (dyn Read + Send),
size: u64,
mime_type: Mime
) -> &mut MultiPartReader<'a>ⓘNotable traits for MultiPartReader<'a>impl<'a> Read for MultiPartReader<'a>
pub fn add_part(
&mut self,
reader: &'a mut (dyn Read + Send),
size: u64,
mime_type: Mime
) -> &mut MultiPartReader<'a>ⓘNotable traits for MultiPartReader<'a>impl<'a> Read for MultiPartReader<'a>
Add a new part to the queue of parts to be read on the first read
call.
Arguments
headers
- identifying the body of the part. It’s similar to the header
in an ordinary single-part call, and should thus contain the
same information.
reader
- a reader providing the part’s body
size
- the amount of bytes provided by the reader. It will be put onto the header as
content-size.
mime
- It will be put onto the content type
Trait Implementations
sourceimpl<'a> Default for MultiPartReader<'a>
impl<'a> Default for MultiPartReader<'a>
sourcefn default() -> MultiPartReader<'a>ⓘNotable traits for MultiPartReader<'a>impl<'a> Read for MultiPartReader<'a>
fn default() -> MultiPartReader<'a>ⓘNotable traits for MultiPartReader<'a>impl<'a> Read for MultiPartReader<'a>
Returns the “default value” for a type. Read more
sourceimpl<'a> Read for MultiPartReader<'a>
impl<'a> Read for MultiPartReader<'a>
sourcefn read(&mut self, buf: &mut [u8]) -> Result<usize>
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
1.36.0 · sourcefn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like read
, except that it reads into a slice of buffers. Read more
sourcefn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector
)Determines if this Read
er has an efficient read_vectored
implementation. Read more
1.0.0 · sourcefn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
Read all bytes until EOF in this source, placing them into buf
. Read more
1.0.0 · sourcefn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Read all bytes until EOF in this source, appending them to buf
. Read more
1.6.0 · sourcefn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Read the exact number of bytes required to fill buf
. Read more
sourcefn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Pull some bytes from this source into the specified buffer. Read more
sourcefn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, buf: &mut ReadBuf<'_>) -> Result<(), Error>
read_buf
)Read the exact number of bytes required to fill buf
. Read more
1.0.0 · sourcefn by_ref(&mut self) -> &mut Self
fn by_ref(&mut self) -> &mut Self
Creates a “by reference” adaptor for this instance of Read
. Read more
Auto Trait Implementations
impl<'a> !RefUnwindSafe for MultiPartReader<'a>
impl<'a> Send for MultiPartReader<'a>
impl<'a> !Sync for MultiPartReader<'a>
impl<'a> Unpin for MultiPartReader<'a>
impl<'a> !UnwindSafe for MultiPartReader<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more