@@ -75,17 +75,19 @@ async fn main() -> Result<(), Error> {
75
75
// Let's write some data into a measurement called `weather`
76
76
let weather_readings = vec! [
77
77
WeatherReading {
78
- time : Timestamp :: Hours (1 ). into (),
78
+ time : Timestamp :: Hours (1 ). try_into () . unwrap (),
79
79
humidity : 30 ,
80
80
wind_direction : String :: from (" north" ),
81
81
}
82
- . into_query (" weather" ),
82
+ . try_into_query (" weather" )
83
+ . unwrap (),
83
84
WeatherReading {
84
- time : Timestamp :: Hours (2 ). into (),
85
+ time : Timestamp :: Hours (2 ). try_into () . unwrap (),
85
86
humidity : 40 ,
86
87
wind_direction : String :: from (" west" ),
87
88
}
88
- . into_query (" weather" ),
89
+ . try_into_query (" weather" )
90
+ . unwrap (),
89
91
];
90
92
91
93
client . query (weather_readings ). await ? ;
@@ -129,7 +131,7 @@ To communicate with InfluxDB, you can choose the HTTP backend to be used configu
129
131
@ 2020-2024 Gero Gerke, msrd0 and [ contributors] .
130
132
131
133
[ contributors ] : https://github.com/influxdb-rs/influxdb-rust/graphs/contributors
132
- [ __cargo_doc2readme_dependencies_info ] : ggGkYW0CYXSEGzJ_QpW55zB1G0S-TER-rIfLG2gXv8EYBG3jG1nuXXn-kdx-YXKEG8LHWNBBuXgSGz-2Lrx4E_kTG0bJiXb6A8zNG9GhXhvU8L0xYWSBgmhpbmZsdXhkYmUwLjcuMg
134
+ [ __cargo_doc2readme_dependencies_info ] : ggGkYW0CYXSEGzJ_QpW55zB1G0S-TER-rIfLG2gXv8EYBG3jG1nuXXn-kdx-YXKEG5esg8JWCUnDGygXCh47ngu0G4kPgAyV809_G2pbKPyN9jeVYWSBgmhpbmZsdXhkYmUwLjcuMg
133
135
[ __link0 ] : https://github.com/influxdb-rs/influxdb-rust/blob/main/CONTRIBUTING.md
134
136
[ __link1 ] : https://github.com/influxdb-rs/influxdb-rust/blob/main/CODE_OF_CONDUCT.md
135
137
[ __link2 ] : https://github.com/influxdb-rs/influxdb-rust/blob/main/CHANGELOG.md
0 commit comments