pub trait Query: Send + Sync {
// Required method
fn serialize<'life0, 'async_trait>(
&'life0 self,
message_type: u8,
is_local: bool,
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Feature of query object.
Required Methods§
Sourcefn serialize<'life0, 'async_trait>(
&'life0 self,
message_type: u8,
is_local: bool,
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn serialize<'life0, 'async_trait>(
&'life0 self,
message_type: u8,
is_local: bool,
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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::asynchronousqmsg_type::synchronousqmsg_type::response
is_local: Flag of whether the connection is within the same host.