pub trait AsyncLeb128ReadExt: AsyncInput<Item = u8> {
Show 24 methods
// Provided methods
fn read_uleb_u8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u8>> + '_
where Self: Unpin { ... }
fn read_uleb_u8_strict_async(
&mut self,
) -> impl Future<Output = Result<u8>> + '_
where Self: Unpin { ... }
fn read_uleb_u16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u16>> + '_
where Self: Unpin { ... }
fn read_uleb_u16_strict_async(
&mut self,
) -> impl Future<Output = Result<u16>> + '_
where Self: Unpin { ... }
fn read_uleb_u32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u32>> + '_
where Self: Unpin { ... }
fn read_uleb_u32_strict_async(
&mut self,
) -> impl Future<Output = Result<u32>> + '_
where Self: Unpin { ... }
fn read_uleb_u64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u64>> + '_
where Self: Unpin { ... }
fn read_uleb_u64_strict_async(
&mut self,
) -> impl Future<Output = Result<u64>> + '_
where Self: Unpin { ... }
fn read_uleb_u128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u128>> + '_
where Self: Unpin { ... }
fn read_uleb_u128_strict_async(
&mut self,
) -> impl Future<Output = Result<u128>> + '_
where Self: Unpin { ... }
fn read_uleb_usize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<usize>> + '_
where Self: Unpin { ... }
fn read_uleb_usize_strict_async(
&mut self,
) -> impl Future<Output = Result<usize>> + '_
where Self: Unpin { ... }
fn read_sleb_i8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_
where Self: Unpin { ... }
fn read_sleb_i8_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_
where Self: Unpin { ... }
fn read_sleb_i16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_
where Self: Unpin { ... }
fn read_sleb_i16_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_
where Self: Unpin { ... }
fn read_sleb_i32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_
where Self: Unpin { ... }
fn read_sleb_i32_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_
where Self: Unpin { ... }
fn read_sleb_i64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_
where Self: Unpin { ... }
fn read_sleb_i64_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_
where Self: Unpin { ... }
fn read_sleb_i128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_
where Self: Unpin { ... }
fn read_sleb_i128_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_
where Self: Unpin { ... }
fn read_sleb_isize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_
where Self: Unpin { ... }
fn read_sleb_isize_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_
where Self: Unpin { ... }
}Expand description
Future-based LEB128 integer reads from runtime-neutral async inputs.
Target-width usize and isize formats remain platform dependent. Use
fixed-width methods for persistent files and cross-platform protocols.
§Cancellation safety
These reads are not cancellation safe. Dropping a pending future leaves bytes already consumed from the input consumed.
§Examples
Define a generic async helper that reads a strict unsigned LEB128 value:
use qubit_io::AsyncInput;
use qubit_io_binary::AsyncLeb128ReadExt;
async fn read_id<I>(input: &mut I) -> std::io::Result<u64>
where
I: AsyncInput<Item = u8> + Unpin,
{
input.read_uleb_u64_strict_async().await
}Provided Methods§
Sourcefn read_uleb_u8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u8>> + '_where
Self: Unpin,
fn read_uleb_u8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u8>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 u8.
§Returns
Returns the decoded u8.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u8_strict_async(&mut self) -> impl Future<Output = Result<u8>> + '_where
Self: Unpin,
fn read_uleb_u8_strict_async(&mut self) -> impl Future<Output = Result<u8>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 u8.
§Returns
Returns the decoded u8.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u16>> + '_where
Self: Unpin,
fn read_uleb_u16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u16>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 u16.
§Returns
Returns the decoded u16.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u16_strict_async(
&mut self,
) -> impl Future<Output = Result<u16>> + '_where
Self: Unpin,
fn read_uleb_u16_strict_async(
&mut self,
) -> impl Future<Output = Result<u16>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 u16.
§Returns
Returns the decoded u16.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u32>> + '_where
Self: Unpin,
fn read_uleb_u32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u32>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 u32.
§Returns
Returns the decoded u32.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u32_strict_async(
&mut self,
) -> impl Future<Output = Result<u32>> + '_where
Self: Unpin,
fn read_uleb_u32_strict_async(
&mut self,
) -> impl Future<Output = Result<u32>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 u32.
§Returns
Returns the decoded u32.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u64>> + '_where
Self: Unpin,
fn read_uleb_u64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u64>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 u64.
§Returns
Returns the decoded u64.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u64_strict_async(
&mut self,
) -> impl Future<Output = Result<u64>> + '_where
Self: Unpin,
fn read_uleb_u64_strict_async(
&mut self,
) -> impl Future<Output = Result<u64>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 u64.
§Returns
Returns the decoded u64.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u128>> + '_where
Self: Unpin,
fn read_uleb_u128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<u128>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 u128.
§Returns
Returns the decoded u128.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_u128_strict_async(
&mut self,
) -> impl Future<Output = Result<u128>> + '_where
Self: Unpin,
fn read_uleb_u128_strict_async(
&mut self,
) -> impl Future<Output = Result<u128>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 u128.
§Returns
Returns the decoded u128.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_usize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<usize>> + '_where
Self: Unpin,
fn read_uleb_usize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<usize>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 usize.
§Returns
Returns the decoded usize.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_uleb_usize_strict_async(
&mut self,
) -> impl Future<Output = Result<usize>> + '_where
Self: Unpin,
fn read_uleb_usize_strict_async(
&mut self,
) -> impl Future<Output = Result<usize>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 usize.
§Returns
Returns the decoded usize.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
fn read_sleb_i8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 i8.
§Returns
Returns the decoded i8.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i8_strict_async(&mut self) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
fn read_sleb_i8_strict_async(&mut self) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 i8.
§Returns
Returns the decoded i8.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
fn read_sleb_i16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 i16.
§Returns
Returns the decoded i16.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i16_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
fn read_sleb_i16_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 i16.
§Returns
Returns the decoded i16.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
fn read_sleb_i32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 i32.
§Returns
Returns the decoded i32.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i32_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
fn read_sleb_i32_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 i32.
§Returns
Returns the decoded i32.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
fn read_sleb_i64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 i64.
§Returns
Returns the decoded i64.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i64_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
fn read_sleb_i64_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 i64.
§Returns
Returns the decoded i64.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
fn read_sleb_i128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 i128.
§Returns
Returns the decoded i128.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_i128_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
fn read_sleb_i128_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 i128.
§Returns
Returns the decoded i128.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_isize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
fn read_sleb_isize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
Asynchronously reads a non-strict LEB128 isize.
§Returns
Returns the decoded isize.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Sourcefn read_sleb_isize_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
fn read_sleb_isize_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
Asynchronously reads a strict LEB128 isize.
§Returns
Returns the decoded isize.
§Errors
Returns an input error or an invalid-data error when the payload is malformed or violates the selected policy.
§Cancellation safety
This operation is not cancellation safe. Dropping the future retains any bytes already consumed from the input.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".