Trait QueryArg

Source
pub trait QueryArg:
    Sized
    + Send
    + Sync {
    // Required methods
    fn encode_slot(&self, encoder: &mut Encoder<'_>) -> Result<(), Error>;
    fn check_descriptor(
        ctx: &DescriptorContext<'_>,
        pos: TypePos,
    ) -> Result<(), Error>;
}
Expand description

A single argument for a query.

Required Methods§

Source

fn encode_slot(&self, encoder: &mut Encoder<'_>) -> Result<(), Error>

Source

fn check_descriptor( ctx: &DescriptorContext<'_>, pos: TypePos, ) -> Result<(), Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> QueryArg for Option<T>
where T: ScalarArg,

Source§

fn encode_slot(&self, enc: &mut Encoder<'_>) -> Result<(), Error>

Source§

fn check_descriptor( ctx: &DescriptorContext<'_>, pos: TypePos, ) -> Result<(), Error>

Implementors§

Source§

impl<T> QueryArg for T
where T: ScalarArg,