pub trait InputStreamExtManual: Sized {
// Required methods
fn read<B: AsMut<[u8]>>(
&self,
buffer: B,
cancellable: Option<&Cancellable>,
) -> Result<usize, Error>;
fn read_all<B: AsMut<[u8]>>(
&self,
buffer: B,
cancellable: Option<&Cancellable>,
) -> Result<(usize, Option<Error>), Error>;
fn read_all_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send + 'static>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&Cancellable>,
callback: Q,
);
fn read_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + Send + 'static>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&Cancellable>,
callback: Q,
);
// Provided method
fn into_read(self) -> InputStreamRead<Self> { ... }
}
Required Methods§
fn read<B: AsMut<[u8]>>( &self, buffer: B, cancellable: Option<&Cancellable>, ) -> Result<usize, Error>
fn read_all<B: AsMut<[u8]>>( &self, buffer: B, cancellable: Option<&Cancellable>, ) -> Result<(usize, Option<Error>), Error>
fn read_all_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send + 'static>( &self, buffer: B, io_priority: Priority, cancellable: Option<&Cancellable>, callback: Q, )
fn read_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + Send + 'static>( &self, buffer: B, io_priority: Priority, cancellable: Option<&Cancellable>, callback: Q, )
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.