Trait OutputStreamExtManual

Source
pub trait OutputStreamExtManual:
    Sealed
    + IsA<OutputStream>
    + Sized {
    // Provided methods
    fn write_async<B: AsRef<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + 'static, C: IsA<Cancellable>>(
        &self,
        buffer: B,
        io_priority: Priority,
        cancellable: Option<&C>,
        callback: Q,
    ) { ... }
    fn write_all<C: IsA<Cancellable>>(
        &self,
        buffer: &[u8],
        cancellable: Option<&C>,
    ) -> Result<(usize, Option<Error>), Error> { ... }
    fn write_all_async<B: AsRef<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + 'static, C: IsA<Cancellable>>(
        &self,
        buffer: B,
        io_priority: Priority,
        cancellable: Option<&C>,
        callback: Q,
    ) { ... }
    fn write_future<B: AsRef<[u8]> + Send + 'static>(
        &self,
        buffer: B,
        io_priority: Priority,
    ) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static>> { ... }
    fn write_all_future<B: AsRef<[u8]> + Send + 'static>(
        &self,
        buffer: B,
        io_priority: Priority,
    ) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static>> { ... }
    fn writev(
        &self,
        vectors: &[OutputVector<'_>],
        cancellable: Option<&impl IsA<Cancellable>>,
    ) -> Result<usize, Error> { ... }
    fn writev_async<B: AsRef<[u8]> + Send + 'static, P: FnOnce(Result<(Vec<B>, usize), (Vec<B>, Error)>) + 'static>(
        &self,
        vectors: impl IntoIterator<Item = B> + 'static,
        io_priority: Priority,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P,
    ) { ... }
    fn writev_future<B: AsRef<[u8]> + Send + 'static>(
        &self,
        vectors: impl IntoIterator<Item = B> + 'static,
        io_priority: Priority,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<B>, usize), (Vec<B>, Error)>> + 'static>> { ... }
    fn writev_all(
        &self,
        vectors: &[OutputVector<'_>],
        cancellable: Option<&impl IsA<Cancellable>>,
    ) -> Result<(usize, Option<Error>), Error> { ... }
    fn writev_all_async<B: AsRef<[u8]> + Send + 'static, P: FnOnce(Result<(Vec<B>, usize, Option<Error>), (Vec<B>, Error)>) + 'static>(
        &self,
        vectors: impl IntoIterator<Item = B> + 'static,
        io_priority: Priority,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P,
    ) { ... }
    fn writev_all_future<B: AsRef<[u8]> + Send + 'static>(
        &self,
        vectors: impl IntoIterator<Item = B> + 'static,
        io_priority: Priority,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<B>, usize, Option<Error>), (Vec<B>, Error)>> + 'static>> { ... }
    fn into_write(self) -> OutputStreamWrite<Self> 
       where Self: IsA<OutputStream> { ... }
}

Provided Methods§

Source

fn write_async<B: AsRef<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + 'static, C: IsA<Cancellable>>( &self, buffer: B, io_priority: Priority, cancellable: Option<&C>, callback: Q, )

Source

fn write_all<C: IsA<Cancellable>>( &self, buffer: &[u8], cancellable: Option<&C>, ) -> Result<(usize, Option<Error>), Error>

Source

fn write_all_async<B: AsRef<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + 'static, C: IsA<Cancellable>>( &self, buffer: B, io_priority: Priority, cancellable: Option<&C>, callback: Q, )

Source

fn write_future<B: AsRef<[u8]> + Send + 'static>( &self, buffer: B, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static>>

Source

fn write_all_future<B: AsRef<[u8]> + Send + 'static>( &self, buffer: B, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static>>

Source

fn writev( &self, vectors: &[OutputVector<'_>], cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<usize, Error>

Available on crate feature v2_60 only.
Source

fn writev_async<B: AsRef<[u8]> + Send + 'static, P: FnOnce(Result<(Vec<B>, usize), (Vec<B>, Error)>) + 'static>( &self, vectors: impl IntoIterator<Item = B> + 'static, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Available on crate feature v2_60 only.
Source

fn writev_future<B: AsRef<[u8]> + Send + 'static>( &self, vectors: impl IntoIterator<Item = B> + 'static, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(Vec<B>, usize), (Vec<B>, Error)>> + 'static>>

Available on crate feature v2_60 only.
Source

fn writev_all( &self, vectors: &[OutputVector<'_>], cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(usize, Option<Error>), Error>

Available on crate feature v2_60 only.
Source

fn writev_all_async<B: AsRef<[u8]> + Send + 'static, P: FnOnce(Result<(Vec<B>, usize, Option<Error>), (Vec<B>, Error)>) + 'static>( &self, vectors: impl IntoIterator<Item = B> + 'static, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Available on crate feature v2_60 only.
Source

fn writev_all_future<B: AsRef<[u8]> + Send + 'static>( &self, vectors: impl IntoIterator<Item = B> + 'static, io_priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<(Vec<B>, usize, Option<Error>), (Vec<B>, Error)>> + 'static>>

Available on crate feature v2_60 only.
Source

fn into_write(self) -> OutputStreamWrite<Self>
where Self: IsA<OutputStream>,

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§