pub fn with_tls_encoded<T, E: From<Error>>(
    val: &mut impl Encodable,
    f: impl FnOnce(&mut Vec<u8>, &mut Vec<Handle>) -> std::result::Result<T, E>,
) -> std::result::Result<T, E> {
    with_tls_coding_bufs(|bytes, handles| {
        Encoder::encode(bytes, handles, val)?;
        f(bytes, handles)
    })
}
/// Encodes the provided type into the thread-local encoding buffers.
///
/// This function may not be called recursively.
Encodes the provided type into the thread-local encoding buffers.
This function may not be called recursively.
Encodes the provided type into the thread - local encoding buffers . This function may not be called recursively .
pub fn with_tls_encoded<T, E: From<Error>>(
    val: &mut impl Encodable,
    f: impl FnOnce(&mut Vec<u8>, &mut Vec<Handle>) -> std::result::Result<T, E>,
) -> std::result::Result<T, E> {
    with_tls_coding_bufs(|bytes, handles| {
        Encoder::encode(bytes, handles, val)?;
        f(bytes, handles)
    })
}
pub fn with_tls_encoded < T , E : From < Error > > ( val : & mut impl Encodable , f : impl FnOnce ( & mut Vec < u8 > , & mut Vec < Handle > ) -> std :: result :: Result < T , E > , ) -> std :: result :: Result < T , E > { with_tls_coding_bufs ( | bytes , handles | { Encoder :: encode ( bytes , handles , val ) ? ; f ( bytes , handles ) } ) }
Encodes the provided type into the thread-local encoding buffers.
Encodes the provided type into the thread - local encoding buffers .
val
&mut impl Encodable
f
impl FnOnce(&mut Vec<u8>, &mut Vec<Handle>) -> std::result::Result<T, E>