Trait InputStreamExt

Source
pub trait InputStreamExt: IsA<InputStream> + 'static {
Show 13 methods // Provided methods fn clear_pending(&self) { ... } fn close( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error> { ... } fn close_async<P>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) where P: FnOnce(Result<(), Error>) + 'static { ... } fn close_future( &self, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(), Error>>>> { ... } fn has_pending(&self) -> bool { ... } fn is_closed(&self) -> bool { ... } fn read_bytes( &self, count: usize, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Bytes, Error> { ... } fn read_bytes_async<P>( &self, count: usize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) where P: FnOnce(Result<Bytes, Error>) + 'static { ... } fn read_bytes_future( &self, count: usize, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>>>> { ... } fn set_pending(&self) -> Result<(), Error> { ... } fn skip( &self, count: usize, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<isize, Error> { ... } fn skip_async<P>( &self, count: usize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) where P: FnOnce(Result<isize, Error>) + 'static { ... } fn skip_future( &self, count: usize, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<isize, Error>>>> { ... }
}

Provided Methods§

Source

fn clear_pending(&self)

Source

fn close( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>

Source

fn close_async<P>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
where P: FnOnce(Result<(), Error>) + 'static,

Source

fn close_future( &self, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(), Error>>>>

Source

fn has_pending(&self) -> bool

Source

fn is_closed(&self) -> bool

Source

fn read_bytes( &self, count: usize, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Bytes, Error>

Source

fn read_bytes_async<P>( &self, count: usize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
where P: FnOnce(Result<Bytes, Error>) + 'static,

Source

fn read_bytes_future( &self, count: usize, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>>>>

Source

fn set_pending(&self) -> Result<(), Error>

Source

fn skip( &self, count: usize, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<isize, Error>

Source

fn skip_async<P>( &self, count: usize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
where P: FnOnce(Result<isize, Error>) + 'static,

Source

fn skip_future( &self, count: usize, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<isize, Error>>>>

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.

Implementors§

Source§

impl<O> InputStreamExt for O
where O: IsA<InputStream>,