pub struct PreferredCrates {
pub date_time: DateTimeCrate,
pub numeric: NumericCrate,
}_unstable-docs only.Fieldsยง
ยงdate_time: DateTimeCrateSpecify the crate to use for mapping date/time types to Rust.
The default behavior is to use whatever crate is enabled,
chrono or time (the latter takes precedent).
ยงExample: Always Use Chrono
Thanks to Cargoโs feature unification, a crate in the dependency graph may enable
the time feature of SQLx which will force it on for all crates using SQLx,
which will result in problems if your crate wants to use types from chrono.
You can use the type override syntax (see sqlx::query! for details),
or you can force an override globally by setting this option.
ยงsqlx.toml
[macros.preferred-crates]
date-time = "chrono"numeric: NumericCrateSpecify the crate to use for mapping NUMERIC types to Rust.
The default behavior is to use whatever crate is enabled,
bigdecimal or rust_decimal (the latter takes precedent).
ยงExample: Always Use bigdecimal
Thanks to Cargoโs feature unification, a crate in the dependency graph may enable
the rust_decimal feature of SQLx which will force it on for all crates using SQLx,
which will result in problems if your crate wants to use types from bigdecimal.
You can use the type override syntax (see sqlx::query! for details),
or you can force an override globally by setting this option.
ยงsqlx.toml
[macros.preferred-crates]
numeric = "bigdecimal"Trait Implementationsยง
Sourceยงimpl Debug for PreferredCrates
impl Debug for PreferredCrates
Sourceยงimpl Default for PreferredCrates
impl Default for PreferredCrates
Sourceยงfn default() -> PreferredCrates
fn default() -> PreferredCrates
Auto Trait Implementationsยง
impl Freeze for PreferredCrates
impl RefUnwindSafe for PreferredCrates
impl Send for PreferredCrates
impl Sync for PreferredCrates
impl Unpin for PreferredCrates
impl UnwindSafe for PreferredCrates
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
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> โ
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> โ
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