Derive macros for stargate-grpc
This crate provides the following derive macros:
IntoValue– enables converting a Rust struct to aValueof a user-defined CQL type; use this when you want to bind a single UDT field in a queryTryFromValue– enables converting aValuerepresenting a user-defined CQL type to a Rust struct; use this to read a single UDT column value from a rowIntoValues– enables converting a Rust struct to many arguments of a query at once;
use this if you want to bind many fields of a single Rust struct in a single call tobindTryFromRow– enables converting aRowreceived in a result set to a Rust value
Example
use Value;
use ;
let user = User ;
// Convert User to Value:
let value = from;
assert_eq!;
// Now convert it back to User:
let user: User = value.try_into.unwrap;
assert_eq!;
assert_eq!;
See crate documentation for more examples.