pub struct Arg {
pub name: String,
pub ty: Type,
}Expand description
A named, typed argument used in query parameterization.
Arg represents a single parameter that can be passed into a query
statement. Each argument has a name for identification and a type that
determines what values it accepts.
§Examples
use toasty_core::schema::app::Arg;
use toasty_core::stmt::Type;
let arg = Arg {
name: "user_id".to_string(),
ty: Type::String,
};
assert_eq!(arg.name, "user_id");Fields§
§name: StringThe argument’s name, used to identify it in queries.
ty: TypeThe statement type this argument accepts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arg
impl RefUnwindSafe for Arg
impl Send for Arg
impl Sync for Arg
impl Unpin for Arg
impl UnwindSafe for Arg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more