Skip to main content

Query

Trait Query 

Source
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§

Source

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::asynchronous
    • qmsg_type::synchronous
    • qmsg_type::response
  • is_local: Flag of whether the connection is within the same host.

Implementations on Foreign Types§

Source§

impl Query for &str

Text query.

Source§

fn serialize<'life0, 'async_trait>( &'life0 self, message_type: u8, __arg2: bool, ) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl Query for K

Functional query.