pub trait Query: Send + Sync {
    fn serialize<'life0, 'async_trait>(
        &'life0 self,
        message_type: u8,
        is_local: bool
    ) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Feature of query object.

Required methods

Serialize into q IPC bytes including a header (encoding, message type, compresssion flag and total message length). If the connection is within the same host, the message is not compressed under any conditions.

Parameters
  • message_type: Message type. One of followings:
    • qmsg_type::asynchronous
    • qmsg_type::synchronous
    • qmsg_type::response
  • is_local: Flag of whether the connection is within the same host.

Implementations on Foreign Types

Text query.

Implementors

Functional query.