Struct taskcluster_download::CursorWriterFactory [−][src]
A CusorWriterFactory creates AsyncWrite objects from a std::io::Cursor, allowing
downloads to in-memory buffers. It is specialized for Vec&mut [u8]
(which has a fixed maximum size)
Implementations
impl CursorWriterFactory<Vec<u8>>
[src]
pub fn new() -> Self
[src]
pub fn into_inner(self) -> Vec<u8>
[src]
Consume the factory, returning the vector into which the data was read
impl<'a> CursorWriterFactory<&'a mut [u8]>
[src]
pub fn for_buf(inner: &'a mut [u8]) -> Self
[src]
pub fn size(self) -> usize
[src]
Return the size of the data written to the buffer. This value should be used to slice the resulting data from the buffer.
Trait Implementations
impl AsyncWriterFactory for CursorWriterFactory<Vec<u8>>
[src]
fn get_writer<'a, 'async_trait>(
&'a mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
&'a mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
impl<'impl0> AsyncWriterFactory for CursorWriterFactory<&'impl0 mut [u8]>
[src]
fn get_writer<'a, 'async_trait>(
&'a mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
&'a mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
impl Default for CursorWriterFactory<Vec<u8>>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for CursorWriterFactory<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for CursorWriterFactory<T> where
T: Send,
T: Send,
impl<T> Sync for CursorWriterFactory<T> where
T: Sync,
T: Sync,
impl<T> Unpin for CursorWriterFactory<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for CursorWriterFactory<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,