| 1 | use bytesrust-analyzer cargo bytes 1.11.1 crate/::BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#; |
| 2 | use jiff_02rust-analyzer cargo jiff 0.2.28 crate/::{ |
| 3 | Spanrust-analyzer cargo jiff 0.2.28 span/Span#, SpanRoundrust-analyzer cargo jiff 0.2.28 span/SpanRound#, Timestamprust-analyzer cargo jiff 0.2.28 timestamp/Timestamp#, Unitrust-analyzer cargo jiff 0.2.28 span/Unit#, |
| 4 | civilrust-analyzer cargo jiff 0.2.28 civil/::{Daterust-analyzer cargo jiff 0.2.28 civil/date/Date#, DateTimerust-analyzer cargo jiff 0.2.28 civil/datetime/DateTime#, Timerust-analyzer cargo jiff 0.2.28 civil/time/Time#}, |
| 5 | }; |
| 6 | use postgres_protocolrust-analyzer cargo postgres-protocol 0.6.12 crate/::typesrust-analyzer cargo postgres-protocol 0.6.12 types/; |
| 7 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#; |
| 8 | |
| 9 | use craterust-analyzer cargo postgres-types 0.2.14 crate/::{FromSqlrust-analyzer cargo postgres-types 0.2.14 FromSql#, IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#, ToSqlrust-analyzer cargo postgres-types 0.2.14 ToSql#, Typerust-analyzer cargo postgres-types 0.2.14 Type#}; |
| 10 | |
| 11 | const fn baserust-analyzer cargo postgres-types 0.2.14 jiff_02/base().() -> DateTimerust-analyzer cargo jiff 0.2.28 civil/datetime/DateTime# { |
| 12 | DateTimerust-analyzer cargo jiff 0.2.28 civil/datetime/DateTime#::constantrust-analyzer cargo jiff 0.2.28 civil/datetime/impl#[DateTime]constant().(2000, 1, 1, 0, 0, 0, 0) |
| 13 | } |
| 14 | |
| 15 | /// The number of seconds from the Unix epoch to 2000-01-01 00:00:00 UTC. |
| 16 | const PG_EPOCHrust-analyzer cargo postgres-types 0.2.14 jiff_02/PG_EPOCH.: i64 = 946684800; |
| 17 | |
| 18 | fn base_tsrust-analyzer cargo postgres-types 0.2.14 jiff_02/base_ts().() -> Timestamprust-analyzer cargo jiff 0.2.28 timestamp/Timestamp# { |
| 19 | Timestamprust-analyzer cargo jiff 0.2.28 timestamp/Timestamp#::newrust-analyzer cargo jiff 0.2.28 timestamp/impl#[Timestamp]new().(PG_EPOCHrust-analyzer cargo postgres-types 0.2.14 jiff_02/PG_EPOCH., 0).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().() |
| 20 | } |
| 21 | |
| 22 | fn round_usrust-analyzer cargo postgres-types 0.2.14 jiff_02/round_us().<'a>() -> SpanRoundrust-analyzer cargo jiff 0.2.28 span/SpanRound#<'a> { |
| 23 | SpanRoundrust-analyzer cargo jiff 0.2.28 span/SpanRound#::newrust-analyzer cargo jiff 0.2.28 span/impl#[`SpanRound<'a>`]new().().largestrust-analyzer cargo jiff 0.2.28 span/impl#[`SpanRound<'a>`]largest().(Unitrust-analyzer cargo jiff 0.2.28 span/Unit#::Microsecondrust-analyzer cargo jiff 0.2.28 span/Unit#Microsecond#) |
| 24 | } |
| 25 | |
| 26 | fn decode_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/decode_err().<E>(_e: E) -> Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#> |
| 27 | where |
| 28 | E: Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#, |
| 29 | { |
| 30 | "value too large to decode".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 31 | } |
| 32 | |
| 33 | fn transmit_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/transmit_err().<E>(_e: E) -> Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#> |
| 34 | where |
| 35 | E: Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#, |
| 36 | { |
| 37 | "value too large to transmit".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 38 | } |
| 39 | |
| 40 | impl<'a> FromSqlrust-analyzer cargo postgres-types 0.2.14 FromSql#<'a> for DateTimerust-analyzer cargo jiff 0.2.28 civil/datetime/DateTime# { |
| 41 | fn from_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[DateTime][`FromSql<'a>`]from_sql().(_: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, raw: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<DateTimerust-analyzer cargo jiff 0.2.28 civil/datetime/DateTime#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 42 | let v = typesrust-analyzer cargo postgres-protocol 0.6.12 types/::timestamp_from_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/timestamp_from_sql().(raw)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 43 | Spanrust-analyzer cargo jiff 0.2.28 span/Span#::newrust-analyzer cargo jiff 0.2.28 span/impl#[Span]new().() |
| 44 | .try_microsecondsrust-analyzer cargo jiff 0.2.28 span/impl#[Span]try_microseconds().(v) |
| 45 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| baserust-analyzer cargo postgres-types 0.2.14 jiff_02/base().().checked_addrust-analyzer cargo jiff 0.2.28 civil/datetime/impl#[DateTime]checked_add().(s)) |
| 46 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(decode_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/decode_err().) |
| 47 | } |
| 48 | |
| 49 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(TIMESTAMPrust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]TIMESTAMP.); |
| 50 | } |
| 51 | |
| 52 | impl ToSqlrust-analyzer cargo postgres-types 0.2.14 ToSql# for DateTimerust-analyzer cargo jiff 0.2.28 civil/datetime/DateTime# { |
| 53 | fn to_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[DateTime][ToSql]to_sql().(&self, _: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, w: &mut BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 54 | let v = self |
| 55 | .sincerust-analyzer cargo jiff 0.2.28 civil/datetime/impl#[DateTime]since().(baserust-analyzer cargo postgres-types 0.2.14 jiff_02/base().()) |
| 56 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| s.roundrust-analyzer cargo jiff 0.2.28 span/impl#[Span]round().(round_usrust-analyzer cargo postgres-types 0.2.14 jiff_02/round_us().().relativerust-analyzer cargo jiff 0.2.28 span/impl#[`SpanRound<'a>`]relative().(baserust-analyzer cargo postgres-types 0.2.14 jiff_02/base().()))) |
| 57 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(transmit_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/transmit_err().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 58 | .get_microsecondsrust-analyzer cargo jiff 0.2.28 span/impl#[Span]get_microseconds().(); |
| 59 | typesrust-analyzer cargo postgres-protocol 0.6.12 types/::timestamp_to_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/timestamp_to_sql().(v, w); |
| 60 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#::Norust-analyzer cargo postgres-types 0.2.14 IsNull#No#) |
| 61 | } |
| 62 | |
| 63 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(TIMESTAMPrust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]TIMESTAMP.); |
| 64 | to_sql_checkedrust-analyzer cargo postgres-types 0.2.14 to_sql_checked!!(); |
| 65 | } |
| 66 | |
| 67 | impl<'a> FromSqlrust-analyzer cargo postgres-types 0.2.14 FromSql#<'a> for Timestamprust-analyzer cargo jiff 0.2.28 timestamp/Timestamp# { |
| 68 | fn from_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[Timestamp][`FromSql<'a>`]from_sql().(_: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, raw: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Timestamprust-analyzer cargo jiff 0.2.28 timestamp/Timestamp#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 69 | let v = typesrust-analyzer cargo postgres-protocol 0.6.12 types/::timestamp_from_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/timestamp_from_sql().(raw)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 70 | Spanrust-analyzer cargo jiff 0.2.28 span/Span#::newrust-analyzer cargo jiff 0.2.28 span/impl#[Span]new().() |
| 71 | .try_microsecondsrust-analyzer cargo jiff 0.2.28 span/impl#[Span]try_microseconds().(v) |
| 72 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| base_tsrust-analyzer cargo postgres-types 0.2.14 jiff_02/base_ts().().checked_addrust-analyzer cargo jiff 0.2.28 timestamp/impl#[Timestamp]checked_add().(s)) |
| 73 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(decode_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/decode_err().) |
| 74 | } |
| 75 | |
| 76 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(TIMESTAMPTZrust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]TIMESTAMPTZ.); |
| 77 | } |
| 78 | |
| 79 | impl ToSqlrust-analyzer cargo postgres-types 0.2.14 ToSql# for Timestamprust-analyzer cargo jiff 0.2.28 timestamp/Timestamp# { |
| 80 | fn to_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[Timestamp][ToSql]to_sql().(&self, _: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, w: &mut BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 81 | let v = self |
| 82 | .sincerust-analyzer cargo jiff 0.2.28 timestamp/impl#[Timestamp]since().(base_tsrust-analyzer cargo postgres-types 0.2.14 jiff_02/base_ts().()) |
| 83 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| s.roundrust-analyzer cargo jiff 0.2.28 span/impl#[Span]round().(round_usrust-analyzer cargo postgres-types 0.2.14 jiff_02/round_us().())) |
| 84 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(transmit_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/transmit_err().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 85 | .get_microsecondsrust-analyzer cargo jiff 0.2.28 span/impl#[Span]get_microseconds().(); |
| 86 | typesrust-analyzer cargo postgres-protocol 0.6.12 types/::timestamp_to_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/timestamp_to_sql().(v, w); |
| 87 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#::Norust-analyzer cargo postgres-types 0.2.14 IsNull#No#) |
| 88 | } |
| 89 | |
| 90 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(TIMESTAMPTZrust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]TIMESTAMPTZ.); |
| 91 | to_sql_checkedrust-analyzer cargo postgres-types 0.2.14 to_sql_checked!!(); |
| 92 | } |
| 93 | |
| 94 | impl<'a> FromSqlrust-analyzer cargo postgres-types 0.2.14 FromSql#<'a> for Daterust-analyzer cargo jiff 0.2.28 civil/date/Date# { |
| 95 | fn from_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[Date][`FromSql<'a>`]from_sql().(_: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, raw: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Daterust-analyzer cargo jiff 0.2.28 civil/date/Date#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 96 | let v = typesrust-analyzer cargo postgres-protocol 0.6.12 types/::date_from_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/date_from_sql().(raw)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 97 | Spanrust-analyzer cargo jiff 0.2.28 span/Span#::newrust-analyzer cargo jiff 0.2.28 span/impl#[Span]new().() |
| 98 | .try_daysrust-analyzer cargo jiff 0.2.28 span/impl#[Span]try_days().(v) |
| 99 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| baserust-analyzer cargo postgres-types 0.2.14 jiff_02/base().().daterust-analyzer cargo jiff 0.2.28 civil/datetime/impl#[DateTime]date().().checked_addrust-analyzer cargo jiff 0.2.28 civil/date/impl#[Date]checked_add().(s)) |
| 100 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(decode_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/decode_err().) |
| 101 | } |
| 102 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(DATErust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]DATE.); |
| 103 | } |
| 104 | |
| 105 | impl ToSqlrust-analyzer cargo postgres-types 0.2.14 ToSql# for Daterust-analyzer cargo jiff 0.2.28 civil/date/Date# { |
| 106 | fn to_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[Date][ToSql]to_sql().(&self, _: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, w: &mut BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 107 | let v = self.sincerust-analyzer cargo jiff 0.2.28 civil/date/impl#[Date]since().(baserust-analyzer cargo postgres-types 0.2.14 jiff_02/base().().daterust-analyzer cargo jiff 0.2.28 civil/datetime/impl#[DateTime]date().()).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(transmit_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/transmit_err().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..get_daysrust-analyzer cargo jiff 0.2.28 span/impl#[Span]get_days().(); |
| 108 | typesrust-analyzer cargo postgres-protocol 0.6.12 types/::date_to_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/date_to_sql().(v, w); |
| 109 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#::Norust-analyzer cargo postgres-types 0.2.14 IsNull#No#) |
| 110 | } |
| 111 | |
| 112 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(DATErust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]DATE.); |
| 113 | to_sql_checkedrust-analyzer cargo postgres-types 0.2.14 to_sql_checked!!(); |
| 114 | } |
| 115 | |
| 116 | impl<'a> FromSqlrust-analyzer cargo postgres-types 0.2.14 FromSql#<'a> for Timerust-analyzer cargo jiff 0.2.28 civil/time/Time# { |
| 117 | fn from_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[Time][`FromSql<'a>`]from_sql().(_: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, raw: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Timerust-analyzer cargo jiff 0.2.28 civil/time/Time#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 118 | let v = typesrust-analyzer cargo postgres-protocol 0.6.12 types/::time_from_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/time_from_sql().(raw)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 119 | Spanrust-analyzer cargo jiff 0.2.28 span/Span#::newrust-analyzer cargo jiff 0.2.28 span/impl#[Span]new().() |
| 120 | .try_microsecondsrust-analyzer cargo jiff 0.2.28 span/impl#[Span]try_microseconds().(v) |
| 121 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| Timerust-analyzer cargo jiff 0.2.28 civil/time/Time#::midnightrust-analyzer cargo jiff 0.2.28 civil/time/impl#[Time]midnight().().checked_addrust-analyzer cargo jiff 0.2.28 civil/time/impl#[Time]checked_add().(s)) |
| 122 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(decode_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/decode_err().) |
| 123 | } |
| 124 | |
| 125 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(TIMErust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]TIME.); |
| 126 | } |
| 127 | |
| 128 | impl ToSqlrust-analyzer cargo postgres-types 0.2.14 ToSql# for Timerust-analyzer cargo jiff 0.2.28 civil/time/Time# { |
| 129 | fn to_sqlrust-analyzer cargo postgres-types 0.2.14 jiff_02/impl#[Time][ToSql]to_sql().(&self, _: &Typerust-analyzer cargo postgres-types 0.2.14 Type#, w: &mut BytesMutrust-analyzer cargo bytes 1.11.1 bytes_mut/BytesMut#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#, Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#>> { |
| 130 | let v = self |
| 131 | .sincerust-analyzer cargo jiff 0.2.28 civil/time/impl#[Time]since().(Timerust-analyzer cargo jiff 0.2.28 civil/time/Time#::midnightrust-analyzer cargo jiff 0.2.28 civil/time/impl#[Time]midnight().()) |
| 132 | .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]and_then().(|s| s.roundrust-analyzer cargo jiff 0.2.28 span/impl#[Span]round().(round_usrust-analyzer cargo postgres-types 0.2.14 jiff_02/round_us().())) |
| 133 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(transmit_errrust-analyzer cargo postgres-types 0.2.14 jiff_02/transmit_err().)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). |
| 134 | .get_microsecondsrust-analyzer cargo jiff 0.2.28 span/impl#[Span]get_microseconds().(); |
| 135 | typesrust-analyzer cargo postgres-protocol 0.6.12 types/::time_to_sqlrust-analyzer cargo postgres-protocol 0.6.12 types/time_to_sql().(v, w); |
| 136 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo postgres-types 0.2.14 IsNull#::Norust-analyzer cargo postgres-types 0.2.14 IsNull#No#) |
| 137 | } |
| 138 | |
| 139 | acceptsrust-analyzer cargo postgres-types 0.2.14 accepts!!(TIMErust-analyzer cargo postgres-types 0.2.14 type_gen/impl#[Type]TIME.); |
| 140 | to_sql_checkedrust-analyzer cargo postgres-types 0.2.14 to_sql_checked!!(); |
| 141 | } |