| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::netrust-analyzer cargo std https://github.com/rust-lang/rust/library/std net/::{IpAddrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/IpAddr#, Ipv4Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv4Addr#, Ipv6Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv6Addr#}; |
| 2 | |
| 3 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::decoderust-analyzer cargo sqlx-core 0.8.3 decode/::Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#; |
| 4 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::encoderust-analyzer cargo sqlx-core 0.8.3 encode/::{Encoderust-analyzer cargo sqlx-core 0.8.3 encode/Encode#, IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#}; |
| 5 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::errorrust-analyzer cargo sqlx-mysql 0.8.3 error/::BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#; |
| 6 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::iorust-analyzer cargo sqlx-mysql 0.8.3 io/::MySqlBufMutExtrust-analyzer cargo sqlx-mysql 0.8.3 io/buf_mut/MySqlBufMutExt#; |
| 7 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::typesrust-analyzer cargo sqlx-mysql 0.8.3 types/::Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#; |
| 8 | use craterust-analyzer cargo sqlx-mysql 0.8.3 crate/::{MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#, MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#, MySqlValueRefrust-analyzer cargo sqlx-mysql 0.8.3 value/MySqlValueRef#}; |
| 9 | |
| 10 | impl Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for Ipv4Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv4Addr# { |
| 11 | fn type_inforust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv4Addr][`Type<MySql>`]type_info().() -> MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo# { |
| 12 | <&str as Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::type_inforust-analyzer cargo sqlx-core 0.8.3 types/impl#[`&T`][`Type<DB>`]type_info().() |
| 13 | } |
| 14 | |
| 15 | fn compatiblerust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv4Addr][`Type<MySql>`]compatible().(ty: &MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#) -> bool { |
| 16 | <&str as Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::compatiblerust-analyzer cargo sqlx-core 0.8.3 types/impl#[`&T`][`Type<DB>`]compatible().(ty) |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | impl Encoderust-analyzer cargo sqlx-core 0.8.3 encode/Encode#<'_, MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for Ipv4Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv4Addr# { |
| 21 | fn encode_by_refrust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv4Addr][`Encode<'_, MySql>`]encode_by_ref().(&self, buf: &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#, BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#> { |
| 22 | buf.put_str_lenencrust-analyzer cargo sqlx-mysql 0.8.3 io/buf_mut/impl#[`Vec<u8>`][MySqlBufMutExt]put_str_lenenc().(&self.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 23 | |
| 24 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#::Norust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#No#) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | impl Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#<'_, MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for Ipv4Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv4Addr# { |
| 29 | fn decoderust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv4Addr][`Decode<'_, MySql>`]decode().(value: MySqlValueRefrust-analyzer cargo sqlx-mysql 0.8.3 value/MySqlValueRef#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv4Addr][`Decode<'_, MySql>`], BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#> { |
| 30 | // delegate to the &str type to decode from MySQL |
| 31 | let text = <&str as Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::decoderust-analyzer cargo sqlx-mysql 0.8.3 types/str/impl#[`&'r str`][`Decode<'r, MySql>`]decode().(value)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 32 | |
| 33 | // parse a Ipv4Addr from the text |
| 34 | text.parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#::intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | impl Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for Ipv6Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv6Addr# { |
| 39 | fn type_inforust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv6Addr][`Type<MySql>`]type_info().() -> MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo# { |
| 40 | <&str as Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::type_inforust-analyzer cargo sqlx-core 0.8.3 types/impl#[`&T`][`Type<DB>`]type_info().() |
| 41 | } |
| 42 | |
| 43 | fn compatiblerust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv6Addr][`Type<MySql>`]compatible().(ty: &MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#) -> bool { |
| 44 | <&str as Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::compatiblerust-analyzer cargo sqlx-core 0.8.3 types/impl#[`&T`][`Type<DB>`]compatible().(ty) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | impl Encoderust-analyzer cargo sqlx-core 0.8.3 encode/Encode#<'_, MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for Ipv6Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv6Addr# { |
| 49 | fn encode_by_refrust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv6Addr][`Encode<'_, MySql>`]encode_by_ref().(&self, buf: &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#, BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#> { |
| 50 | buf.put_str_lenencrust-analyzer cargo sqlx-mysql 0.8.3 io/buf_mut/impl#[`Vec<u8>`][MySqlBufMutExt]put_str_lenenc().(&self.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 51 | |
| 52 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#::Norust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#No#) |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | impl Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#<'_, MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for Ipv6Addrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/Ipv6Addr# { |
| 57 | fn decoderust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv6Addr][`Decode<'_, MySql>`]decode().(value: MySqlValueRefrust-analyzer cargo sqlx-mysql 0.8.3 value/MySqlValueRef#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[Ipv6Addr][`Decode<'_, MySql>`], BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#> { |
| 58 | // delegate to the &str type to decode from MySQL |
| 59 | let text = <&str as Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::decoderust-analyzer cargo sqlx-mysql 0.8.3 types/str/impl#[`&'r str`][`Decode<'r, MySql>`]decode().(value)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 60 | |
| 61 | // parse a Ipv6Addr from the text |
| 62 | text.parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#::intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | impl Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for IpAddrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/IpAddr# { |
| 67 | fn type_inforust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[IpAddr][`Type<MySql>`]type_info().() -> MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo# { |
| 68 | <&str as Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::type_inforust-analyzer cargo sqlx-core 0.8.3 types/impl#[`&T`][`Type<DB>`]type_info().() |
| 69 | } |
| 70 | |
| 71 | fn compatiblerust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[IpAddr][`Type<MySql>`]compatible().(ty: &MySqlTypeInforust-analyzer cargo sqlx-mysql 0.8.3 type_info/MySqlTypeInfo#) -> bool { |
| 72 | <&str as Typerust-analyzer cargo sqlx-core 0.8.3 types/Type#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::compatiblerust-analyzer cargo sqlx-core 0.8.3 types/impl#[`&T`][`Type<DB>`]compatible().(ty) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | impl Encoderust-analyzer cargo sqlx-core 0.8.3 encode/Encode#<'_, MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for IpAddrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/IpAddr# { |
| 77 | fn encode_by_refrust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[IpAddr][`Encode<'_, MySql>`]encode_by_ref().(&self, buf: &mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#, BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#> { |
| 78 | buf.put_str_lenencrust-analyzer cargo sqlx-mysql 0.8.3 io/buf_mut/impl#[`Vec<u8>`][MySqlBufMutExt]put_str_lenenc().(&self.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 79 | |
| 80 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(IsNullrust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#::Norust-analyzer cargo sqlx-core 0.8.3 encode/IsNull#No#) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | impl Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#<'_, MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#> for IpAddrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core net/ip_addr/IpAddr# { |
| 85 | fn decoderust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[IpAddr][`Decode<'_, MySql>`]decode().(value: MySqlValueRefrust-analyzer cargo sqlx-mysql 0.8.3 value/MySqlValueRef#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo sqlx-mysql 0.8.3 types/inet/impl#[IpAddr][`Decode<'_, MySql>`], BoxDynErrorrust-analyzer cargo sqlx-core 0.8.3 error/BoxDynError#> { |
| 86 | // delegate to the &str type to decode from MySQL |
| 87 | let text = <&str as Decoderust-analyzer cargo sqlx-core 0.8.3 decode/Decode#<MySqlrust-analyzer cargo sqlx-mysql 0.8.3 database/MySql#>>::decoderust-analyzer cargo sqlx-mysql 0.8.3 types/str/impl#[`&'r str`][`Decode<'r, MySql>`]decode().(value)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 88 | |
| 89 | // parse a IpAddr from the text |
| 90 | text.parserust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]parse().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#::intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().) |
| 91 | } |
| 92 | } |