Skip to main content

decode_async_std_with_context

Function decode_async_std_with_context 

Source
pub async fn decode_async_std_with_context<T, R, C, Context>(
    config: C,
    reader: R,
    context: Context,
) -> Result<T, DecodeError>
where T: Decode<Context>, R: AsyncRead + Unpin, C: Config, C::Mode: InternalFingerprintGuard<T, C>,
Available on crate feature async-fiber only.
Expand description

Attempt to decode a given type T from an async-std reader.

Requires the async-fiber feature.

ยงErrors

Returns a DecodeError if the reader fails or the data is invalid.