pub struct QueriesConfig {
pub dir: String,
pub out: String,
pub include_prefix: Option<String>,
}Expand description
The [queries] section: where the .sql files are, and where the
generated modules go.
Fields§
§dir: StringThe directory holding the .sql query files. Every .sql file
directly inside it is generated from, in sorted order.
out: StringWhere the generated modules land. Defaults to <dir> is deliberately
not the rule — generated code and hand-written SQL stay apart.
include_prefix: Option<String>Path prefix the generated include_str! uses instead of the one
computed from out → dir. Set it when the two are not relatable
(different roots, or a build script writing outside the source tree).
Trait Implementations§
Source§impl Clone for QueriesConfig
impl Clone for QueriesConfig
Source§fn clone(&self) -> QueriesConfig
fn clone(&self) -> QueriesConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueriesConfig
impl Debug for QueriesConfig
Source§impl<'de> Deserialize<'de> for QueriesConfig
impl<'de> Deserialize<'de> for QueriesConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QueriesConfig
impl RefUnwindSafe for QueriesConfig
impl Send for QueriesConfig
impl Sync for QueriesConfig
impl Unpin for QueriesConfig
impl UnsafeUnpin for QueriesConfig
impl UnwindSafe for QueriesConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more