pub struct FileReader<'a> {
pub path: &'a str,
pub print_progress: bool,
}Expand description
Streaming FileReader
Available with feature streaming only
Fields§
§path: &'a str§print_progress: boolTrait Implementations§
Source§impl<'a> Debug for FileReader<'a>
impl<'a> Debug for FileReader<'a>
Source§impl EncStreamReader for FileReader<'_>
impl EncStreamReader for FileReader<'_>
Source§fn debug_reader(&self, f: &mut Formatter<'_>) -> Result
fn debug_reader(&self, f: &mut Formatter<'_>) -> Result
Debug output for this reader
Source§fn spawn_reader_encryption<'async_trait>(
self,
chunk_size: ChunkSizeKb,
tx: Sender<Result<(LastStreamElement, StreamChunk), CryptrError>>,
) -> Pin<Box<dyn Future<Output = Result<JoinHandle<Result<(), CryptrError>>, CryptrError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn spawn_reader_encryption<'async_trait>(
self,
chunk_size: ChunkSizeKb,
tx: Sender<Result<(LastStreamElement, StreamChunk), CryptrError>>,
) -> Pin<Box<dyn Future<Output = Result<JoinHandle<Result<(), CryptrError>>, CryptrError>> + Send + 'async_trait>>where
Self: 'async_trait,
This must spawn the reader into the async context and then return.
The reason is, that you are way more flexible optimizing with lifetimes and such. Read more
Source§fn spawn_reader_decryption<'async_trait>(
self,
tx_init: Sender<(EncValueHeader, Vec<u8>)>,
tx: Sender<Result<(LastStreamElement, StreamChunk), CryptrError>>,
) -> Pin<Box<dyn Future<Output = Result<JoinHandle<Result<(), CryptrError>>, CryptrError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn spawn_reader_decryption<'async_trait>(
self,
tx_init: Sender<(EncValueHeader, Vec<u8>)>,
tx: Sender<Result<(LastStreamElement, StreamChunk), CryptrError>>,
) -> Pin<Box<dyn Future<Output = Result<JoinHandle<Result<(), CryptrError>>, CryptrError>> + Send + 'async_trait>>where
Self: 'async_trait,
This must spawn the reader into the async context and then return.
The reason is, that you are way more flexible optimizing with lifetimes and such. Read more
Auto Trait Implementations§
impl<'a> Freeze for FileReader<'a>
impl<'a> RefUnwindSafe for FileReader<'a>
impl<'a> Send for FileReader<'a>
impl<'a> Sync for FileReader<'a>
impl<'a> Unpin for FileReader<'a>
impl<'a> UnwindSafe for FileReader<'a>
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