pub struct CursorWriterFactory<T>(/* private fields */);
Expand description
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§
Source§impl CursorWriterFactory<Vec<u8>>
impl CursorWriterFactory<Vec<u8>>
Trait Implementations§
Source§impl AsyncWriterFactory for CursorWriterFactory<&mut [u8]>
impl AsyncWriterFactory for CursorWriterFactory<&mut [u8]>
Source§fn get_writer<'a, 'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn get_writer<'a, 'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Get a fresh AsyncWrite object, positioned at the point where downloaded data should
be written.
Source§impl AsyncWriterFactory for CursorWriterFactory<Vec<u8>>
impl AsyncWriterFactory for CursorWriterFactory<Vec<u8>>
Source§fn get_writer<'a, 'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn get_writer<'a, 'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Get a fresh AsyncWrite object, positioned at the point where downloaded data should
be written.
Auto Trait Implementations§
impl<T> Freeze for CursorWriterFactory<T>where
T: Freeze,
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§
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