pub struct PreferredCrates {
pub date_time: DateTimeCrate,
pub numeric: NumericCrate,
}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