pub trait AsyncLeb128WriteExt: AsyncOutput<Item = u8> {
// Provided methods
fn write_uleb_u8_async(
&mut self,
value: u8,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_uleb_u16_async(
&mut self,
value: u16,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_uleb_u32_async(
&mut self,
value: u32,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_uleb_u64_async(
&mut self,
value: u64,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_uleb_u128_async(
&mut self,
value: u128,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_uleb_usize_async(
&mut self,
value: usize,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_sleb_i8_async(
&mut self,
value: i8,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_sleb_i16_async(
&mut self,
value: i16,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_sleb_i32_async(
&mut self,
value: i32,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_sleb_i64_async(
&mut self,
value: i64,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_sleb_i128_async(
&mut self,
value: i128,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
fn write_sleb_isize_async(
&mut self,
value: isize,
) -> impl Future<Output = Result<()>> + '_
where Self: Unpin { ... }
}Expand description
Future-based canonical LEB128 writes to runtime-neutral async outputs.
§Cancellation safety
These writes are not cancellation safe. Dropping a pending future leaves an already-written prefix in the output.
§Examples
use qubit_io::AsyncOutput;
use qubit_io_binary::AsyncLeb128WriteExt;
async fn write_value<O>(output: &mut O) -> std::io::Result<()>
where
O: AsyncOutput<Item = u8> + Unpin,
{
output.write_uleb_u32_async(300).await
}Provided Methods§
Sourcefn write_uleb_u8_async(
&mut self,
value: u8,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_uleb_u8_async(
&mut self,
value: u8,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 u8.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_uleb_u16_async(
&mut self,
value: u16,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_uleb_u16_async(
&mut self,
value: u16,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 u16.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_uleb_u32_async(
&mut self,
value: u32,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_uleb_u32_async(
&mut self,
value: u32,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 u32.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_uleb_u64_async(
&mut self,
value: u64,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_uleb_u64_async(
&mut self,
value: u64,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 u64.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_uleb_u128_async(
&mut self,
value: u128,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_uleb_u128_async(
&mut self,
value: u128,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 u128.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_uleb_usize_async(
&mut self,
value: usize,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_uleb_usize_async(
&mut self,
value: usize,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 usize.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_sleb_i8_async(
&mut self,
value: i8,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_sleb_i8_async(
&mut self,
value: i8,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 i8.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_sleb_i16_async(
&mut self,
value: i16,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_sleb_i16_async(
&mut self,
value: i16,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 i16.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_sleb_i32_async(
&mut self,
value: i32,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_sleb_i32_async(
&mut self,
value: i32,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 i32.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_sleb_i64_async(
&mut self,
value: i64,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_sleb_i64_async(
&mut self,
value: i64,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 i64.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_sleb_i128_async(
&mut self,
value: i128,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_sleb_i128_async(
&mut self,
value: i128,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 i128.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Sourcefn write_sleb_isize_async(
&mut self,
value: isize,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
fn write_sleb_isize_async(
&mut self,
value: isize,
) -> impl Future<Output = Result<()>> + '_where
Self: Unpin,
Asynchronously writes LEB128 isize.
§Parameters
value: Integer to encode and write.
§Returns
Returns a future that completes after the canonical payload has been written.
§Errors
Returns an output error, including a write-zero error when the output stops making progress.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already written to the output.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".