Skip to content

Commit aab8930

Browse files
committed
chore(CHANGELOG): update with the AstarteObject changes
Signed-off-by: Joshua Chapman <joshua.chapman@secomind.com>
1 parent 4d92818 commit aab8930

File tree

6 files changed

+18
-4
lines changed

6 files changed

+18
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1111

1212
- Introduce `webpki` feature to use Mozilla webpki root certificates rather than the native ones
1313
[#396](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/396).
14+
- Add the AstarteObject struct for Object Datastream [#430].
1415

1516
### Changed
1617

1718
- Bump MSRV to 1.78.0 [#395](https://github.com/astarte-platform/astarte-device-sdk-rust/pull/395).
19+
- Rename the AstarteAggregate derive macro to IntoAstarteObject [#430].
20+
- Remove the AstarteAggregate trait in favor of the AstarteObject [#430].
21+
- Change the send_object client methods to receive an AstarteObject argument [#430].
22+
23+
[#430]: (https://github.com/astarte-platform/astarte-device-sdk-rust/pull/430)
1824

1925
## [0.9.6] - 2025-03-06
2026

src/aggregate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::types::AstarteType;
2828
///
2929
/// # Example
3030
///
31-
/// Parse this data structure into a `HashMap` compatible with transmission of Astarte objects.
31+
/// Create the data structure `AstarteObject` used to transmit of Astarte objects.
3232
///
3333
/// ```
3434
/// use astarte_device_sdk::aggregate::AstarteObject;
@@ -169,7 +169,7 @@ impl Value {
169169
}
170170
}
171171

172-
/// Take out of the enum an [`HashMap`] if the aggregate is [`Object`](Value::Object).
172+
/// Take out of the enum an [`AstarteObject`] if the aggregate is [`Object`](Value::Object).
173173
pub fn take_object(self) -> Option<AstarteObject> {
174174
if let Self::Object(v) = self {
175175
Some(v)

src/client.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ pub trait Client {
106106
/// store::memory::MemoryStore, builder::DeviceBuilder,
107107
/// transport::mqtt::MqttConfig, types::AstarteType, prelude::*,
108108
/// };
109+
/// # #[cfg(feature = "derive")]
110+
/// use astarte_device_sdk::IntoAstarteObject;
109111
/// # #[cfg(not(feature = "derive"))]
110112
/// # use astarte_device_sdk_derive::IntoAstarteObject;
111113
/// use chrono::{TimeZone, Utc};

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ mod test {
8787
use crate::transport::mqtt::payload::Payload as MqttPayload;
8888
use crate::transport::mqtt::test::{mock_mqtt_connection, notify_success};
8989
use crate::transport::mqtt::Mqtt;
90+
#[cfg(feature = "derive")]
91+
use crate::IntoAstarteObject;
9092
use crate::{
9193
self as astarte_device_sdk, Client, DeviceClient, DeviceConnection, EventLoop, Interface,
9294
};
9395
use crate::{types::AstarteType, Value};
94-
use astarte_device_sdk::IntoAstarteObject;
9596
#[cfg(not(feature = "derive"))]
9697
use astarte_device_sdk_derive::IntoAstarteObject;
9798

src/prelude.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ pub mod properties {
3636

3737
pub use device::*;
3838
pub use properties::*;
39+
40+
#[cfg(feature = "derive")]
41+
pub use crate::IntoAstarteObject;

src/store/sqlite/statements.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,11 @@ impl ReadConnection {
197197
pub(crate) fn connect(db_file: impl AsRef<Path>) -> Result<Self, SqliteError> {
198198
let flags = OpenFlags::SQLITE_OPEN_READ_ONLY | OpenFlags::SQLITE_OPEN_NO_MUTEX;
199199

200-
let mut connection =
200+
let connection =
201201
Connection::open_with_flags(db_file, flags).map_err(SqliteError::Connection)?;
202202

203+
#[cfg(feature = "sqlite-trace")]
204+
let mut connection = connection;
203205
#[cfg(feature = "sqlite-trace")]
204206
connection.trace(Some(trace_sqlite));
205207

0 commit comments

Comments
 (0)