Skip to main content

AsyncZigZagReadExt

Trait AsyncZigZagReadExt 

Source
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.

Provided Methods§

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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".

Implementors§

Source§

impl<R> AsyncZigZagReadExt for R
where R: AsyncInput<Item = u8> + ?Sized,