Skip to content

Commit 481ee9c

Browse files
committed
codec: update Postbag to 0.3.0
1 parent c93d2e6 commit 481ee9c

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/rtc/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

remoc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ uuid = { version = "1.15", features = ["serde", "v4"] }
6969
serde = { version = "1.0", features = ["derive"], optional = true }
7070

7171
# Codecs
72-
postbag = { version = "0.2", optional = true }
72+
postbag = { version = "0.3", optional = true }
7373
serde_json = { version = "1.0", optional = true }
7474
bincode = { version = "2.0", default-features = false, features = ["std", "serde"], optional = true }
7575
ciborium = { version = "0.2", optional = true }

remoc/src/codec/postbag.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use super::{Codec, DeserializationError, SerializationError};
55
/// [Postbag codec](postbag) with full forward and backward compatibility.
66
///
77
/// Postbag is a high-performance binary codec that provides efficient data encoding
8-
/// with configurable levels of forward and backward compatibility. This codec uses the [`Full`](postbag::Full)
8+
/// with configurable levels of forward and backward compatibility. This codec uses the [`Full`](postbag::cfg::Full)
99
/// configuration which provides maximum compatibility and schema evolution capabilities.
1010
///
1111
/// ## Key Features
@@ -57,7 +57,7 @@ impl Codec for Postbag {
5757
Writer: std::io::Write,
5858
Item: serde::Serialize,
5959
{
60-
postbag::serialize::<postbag::Full, _, _>(item, writer).map_err(SerializationError::new)?;
60+
postbag::serialize::<postbag::cfg::Full, _, _>(item, writer).map_err(SerializationError::new)?;
6161
Ok(())
6262
}
6363

@@ -66,14 +66,15 @@ impl Codec for Postbag {
6666
Reader: std::io::Read,
6767
Item: serde::de::DeserializeOwned,
6868
{
69-
let value = postbag::deserialize::<postbag::Full, _, _>(reader).map_err(DeserializationError::new)?;
69+
let value =
70+
postbag::deserialize::<postbag::cfg::Full, _, _>(reader).map_err(DeserializationError::new)?;
7071
Ok(value)
7172
}
7273
}
7374

7475
/// [Postbag slim codec](postbag) for compact, high-performance encoding.
7576
///
76-
/// The [`Slim`](postbag::Slim) configuration prioritizes performance and compact size over compatibility.
77+
/// The [`Slim`](postbag::cfg::Slim) configuration prioritizes performance and compact size over compatibility.
7778
/// This codec provides efficient binary encoding but with limited schema evolution
7879
/// capabilities compared to the full `Postbag` codec.
7980
///
@@ -124,7 +125,7 @@ impl Codec for PostbagSlim {
124125
Writer: std::io::Write,
125126
Item: serde::Serialize,
126127
{
127-
postbag::serialize::<postbag::Slim, _, _>(item, writer).map_err(SerializationError::new)?;
128+
postbag::serialize::<postbag::cfg::Slim, _, _>(item, writer).map_err(SerializationError::new)?;
128129
Ok(())
129130
}
130131

@@ -133,7 +134,8 @@ impl Codec for PostbagSlim {
133134
Reader: std::io::Read,
134135
Item: serde::de::DeserializeOwned,
135136
{
136-
let value = postbag::deserialize::<postbag::Slim, _, _>(reader).map_err(DeserializationError::new)?;
137+
let value =
138+
postbag::deserialize::<postbag::cfg::Slim, _, _>(reader).map_err(DeserializationError::new)?;
137139
Ok(value)
138140
}
139141
}

0 commit comments

Comments
 (0)