pub trait QueryResult: Sealed {
type State;
// Required methods
fn prepare(
ctx: &DescriptorContext<'_>,
root_pos: TypePos,
) -> Result<Self::State, Error>;
fn decode(state: &mut Self::State, msg: &Bytes) -> Result<Self, Error>;
}
Expand description
A trait representing single result from a query.
This is implemented for scalars and tuples. To receive a shape from EdgeDB
derive Queryable
for a structure. This will automatically
implement QueryResult
for you.
Required Associated Types§
Required Methods§
fn prepare( ctx: &DescriptorContext<'_>, root_pos: TypePos, ) -> Result<Self::State, Error>
fn decode(state: &mut Self::State, msg: &Bytes) -> Result<Self, 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.