pub trait AsyncZigZagReadExt: AsyncInput<Item = u8> {
// Provided methods
fn read_zig_zag_i8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i8_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i16_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i32_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i64_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_
where Self: Unpin { ... }
fn read_zig_zag_i128_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_
where Self: Unpin { ... }
fn read_zig_zag_isize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_
where Self: Unpin { ... }
fn read_zig_zag_isize_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_
where Self: Unpin { ... }
}Expand description
Future-based ZigZag plus unsigned-LEB128 reads.
§Cancellation safety
These reads are not cancellation safe. Dropping a pending future leaves bytes already consumed from the input consumed.
§Examples
use qubit_io_binary::AsyncZigZagReadExt;
async fn read_i32<R>(input: &mut R) -> std::io::Result<i32>
where
R: AsyncZigZagReadExt + Unpin,
{
input.read_zig_zag_i32_strict_async().await
}Provided Methods§
Sourcefn read_zig_zag_i8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
fn read_zig_zag_i8_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
Asynchronously reads non-strict ZigZag 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_zig_zag_i8_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
fn read_zig_zag_i8_strict_async(
&mut self,
) -> impl Future<Output = Result<i8>> + '_where
Self: Unpin,
Asynchronously reads strict ZigZag 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_zig_zag_i16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
fn read_zig_zag_i16_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
Asynchronously reads non-strict ZigZag 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_zig_zag_i16_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
fn read_zig_zag_i16_strict_async(
&mut self,
) -> impl Future<Output = Result<i16>> + '_where
Self: Unpin,
Asynchronously reads strict ZigZag 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_zig_zag_i32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
fn read_zig_zag_i32_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
Asynchronously reads non-strict ZigZag 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_zig_zag_i32_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
fn read_zig_zag_i32_strict_async(
&mut self,
) -> impl Future<Output = Result<i32>> + '_where
Self: Unpin,
Asynchronously reads strict ZigZag 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_zig_zag_i64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
fn read_zig_zag_i64_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
Asynchronously reads non-strict ZigZag 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_zig_zag_i64_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
fn read_zig_zag_i64_strict_async(
&mut self,
) -> impl Future<Output = Result<i64>> + '_where
Self: Unpin,
Asynchronously reads strict ZigZag 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_zig_zag_i128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
fn read_zig_zag_i128_non_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
Asynchronously reads non-strict ZigZag 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_zig_zag_i128_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
fn read_zig_zag_i128_strict_async(
&mut self,
) -> impl Future<Output = Result<i128>> + '_where
Self: Unpin,
Asynchronously reads strict ZigZag 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_zig_zag_isize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
fn read_zig_zag_isize_non_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
Asynchronously reads non-strict ZigZag 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_zig_zag_isize_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
fn read_zig_zag_isize_strict_async(
&mut self,
) -> impl Future<Output = Result<isize>> + '_where
Self: Unpin,
Asynchronously reads strict ZigZag 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".