Trait ux::prelude::InputStreamExtManual [−]
pub trait InputStreamExtManual {
pub fn read<B, C>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<usize, Error>
where
C: IsA<Cancellable>,
B: AsMut<[u8]>;
pub fn read_all<B, C>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<(usize, Option<Error>), Error>
where
C: IsA<Cancellable>,
B: AsMut<[u8]>;
pub fn read_all_async<B, Q, C>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
)
where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send;
pub fn read_async<B, Q, C>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
)
where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize), (B, Error)>) + Send;
pub fn read_all_async_future<B>(
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static, Global>>
where
B: 'static + AsMut<[u8]> + Send;
pub fn read_async_future<B>(
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static, Global>>
where
B: 'static + AsMut<[u8]> + Send;
pub fn into_read(self) -> InputStreamRead<Self>
where
Self: IsA<InputStream>,
{ ... }
pub fn into_async_buf_read(
self,
buffer_size: usize
) -> InputStreamAsyncBufRead<Self>
where
Self: IsA<InputStream>,
{ ... }
}Required methods
pub fn read<B, C>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<usize, Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<usize, Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
pub fn read_all<B, C>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<(usize, Option<Error>), Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<(usize, Option<Error>), Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
pub fn read_all_async<B, Q, C>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send,
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send,
pub fn read_async<B, Q, C>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize), (B, Error)>) + Send,
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize), (B, Error)>) + Send,
pub fn read_all_async_future<B>(
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
pub fn read_async_future<B>(
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
Provided methods
pub fn into_read(self) -> InputStreamRead<Self> where
Self: IsA<InputStream>,
Self: IsA<InputStream>,
pub fn into_async_buf_read(
self,
buffer_size: usize
) -> InputStreamAsyncBufRead<Self> where
Self: IsA<InputStream>,
self,
buffer_size: usize
) -> InputStreamAsyncBufRead<Self> where
Self: IsA<InputStream>,
Implementors
impl<O> InputStreamExtManual for O where
O: IsA<InputStream>,
O: IsA<InputStream>,
pub fn read<B, C>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<usize, Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<usize, Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
pub fn read_all<B, C>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<(usize, Option<Error>), Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<(usize, Option<Error>), Error> where
C: IsA<Cancellable>,
B: AsMut<[u8]>,
pub fn read_all_async<B, Q, C>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send,
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + Send,
pub fn read_async<B, Q, C>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize), (B, Error)>) + Send,
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
) where
C: IsA<Cancellable>,
B: 'static + AsMut<[u8]> + Send,
Q: 'static + FnOnce(Result<(B, usize), (B, Error)>) + Send,
pub fn read_all_async_future<B>(
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
pub fn read_async_future<B>(
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,
&self,
buffer: B,
io_priority: Priority
) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static, Global>> where
B: 'static + AsMut<[u8]> + Send,