pub trait AsyncInlinable {
    fn read_inlined<'life0, 'async_trait, R>(
        reader: &'life0 mut R
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
    where
        Self: Sized,
        R: 'async_trait + AsyncRead + Send + Unpin,
        'life0: 'async_trait,
        Self: 'async_trait
; fn write_inlined<'life0, 'life1, 'async_trait, W>(
        &'life0 self,
        wtr: &'life1 mut W
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
    where
        W: 'async_trait + AsyncWrite + Send + Unpin,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn read_optional_inlined<'life0, 'async_trait, R>(
        reader: &'life0 mut R
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self>>> + Send + 'async_trait>>
    where
        Self: Sized,
        R: 'async_trait + AsyncRead + Send + Unpin,
        'life0: 'async_trait,
        Self: Send + 'async_trait
, { ... } fn write_inlined_with<'life0, 'life1, 'async_trait, W>(
        &'life0 self,
        wtr: &'life1 mut W,
        _opts: InlineOpts
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
    where
        W: 'async_trait + AsyncWrite + Send + Unpin,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: Sync + 'async_trait
, { ... } fn inlined<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... } fn printable_inlined<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... } }
Expand description

If one struct could be serialized/flattened to bytes array, we call it inlinable.

Required Methods

Read inlined bytes into object.

Write inlined bytes to a writer.

Provided Methods

Write inlined bytes with specific options

Get inlined bytes as vector.

Get inlined bytes as printable string, all the bytes will displayed with escaped ascii code.

Implementors