Struct taskcluster_download::CursorWriterFactory[][src]

pub struct CursorWriterFactory<T>(_);

A CusorWriterFactory creates AsyncWrite objects from a std::io::Cursor, allowing downloads to in-memory buffers. It is specialized for Vec (which grows indefinitely) and &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]

impl<'impl0> AsyncWriterFactory for CursorWriterFactory<&'impl0 mut [u8]>[src]

impl Default for CursorWriterFactory<Vec<u8>>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for CursorWriterFactory<T> where
    T: RefUnwindSafe

impl<T> Send for CursorWriterFactory<T> where
    T: Send

impl<T> Sync for CursorWriterFactory<T> where
    T: Sync

impl<T> Unpin for CursorWriterFactory<T> where
    T: Unpin

impl<T> UnwindSafe for CursorWriterFactory<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.