From 9bae4d8b801c489d7390176d7c76e474ea0befe2 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Fri, 4 Oct 2024 14:07:38 +0200 Subject: [PATCH 1/8] serialized typeencoding added, basic types and replyerror encoding removed --- zenoh/src/api/encoding.rs | 249 +++----------------------------------- 1 file changed, 15 insertions(+), 234 deletions(-) diff --git a/zenoh/src/api/encoding.rs b/zenoh/src/api/encoding.rs index bc335a5fc..9fef0b811 100644 --- a/zenoh/src/api/encoding.rs +++ b/zenoh/src/api/encoding.rs @@ -86,147 +86,32 @@ impl Encoding { /// /// Constant alias for string: `"zenoh/bytes"`. /// - /// Usually used for types: `Vec`, `&[u8]`, `[u8; N]`, `Cow<[u8]>`. + /// This encoding supposes that the payload was created with [`ZBytes::from::>`](crate::bytes::ZBytes::from) or similar and + /// its data should be accessed with `ZBytes::to_bytes()`, no additional assumptions are made pub const ZENOH_BYTES: Encoding = Self(zenoh_protocol::core::Encoding { id: 0, schema: None, }); - /// A VLE-encoded signed little-endian 8bit integer. Binary representation uses two's complement. - /// - /// Constant alias for string: `"zenoh/int8"`. - /// - /// Usually used for types: `i8`. - pub const ZENOH_INT8: Encoding = Self(zenoh_protocol::core::Encoding { - id: 1, - schema: None, - }); - /// A VLE-encoded signed little-endian 16bit integer. Binary representation uses two's complement. - /// - /// Constant alias for string: `"zenoh/int16"`. - /// - /// Usually used for types: `i16`. - pub const ZENOH_INT16: Encoding = Self(zenoh_protocol::core::Encoding { - id: 2, - schema: None, - }); - /// A VLE-encoded signed little-endian 32bit integer. Binary representation uses two's complement. - /// - /// Constant alias for string: `"zenoh/int32"`. - /// - /// Usually used for types: `i32`. - pub const ZENOH_INT32: Encoding = Self(zenoh_protocol::core::Encoding { - id: 3, - schema: None, - }); - /// A VLE-encoded signed little-endian 64bit integer. Binary representation uses two's complement. - /// - /// Constant alias for string: `"zenoh/int64"`. - /// - /// Usually used for types: `i64`. - pub const ZENOH_INT64: Encoding = Self(zenoh_protocol::core::Encoding { - id: 4, - schema: None, - }); - /// A VLE-encoded signed little-endian 128bit integer. Binary representation uses two's complement. - /// - /// Constant alias for string: `"zenoh/int128"`. - /// - /// Usually used for types: `i128`. - pub const ZENOH_INT128: Encoding = Self(zenoh_protocol::core::Encoding { - id: 5, - schema: None, - }); - /// A VLE-encoded unsigned little-endian 8bit integer. - /// - /// Constant alias for string: `"zenoh/uint8"`. - /// - /// Usually used for types: `u8`. - pub const ZENOH_UINT8: Encoding = Self(zenoh_protocol::core::Encoding { - id: 6, - schema: None, - }); - /// A VLE-encoded unsigned little-endian 16bit integer. - /// - /// Constant alias for string: `"zenoh/uint16"`. - /// - /// Usually used for types: `u16`. - pub const ZENOH_UINT16: Encoding = Self(zenoh_protocol::core::Encoding { - id: 7, - schema: None, - }); - /// A VLE-encoded unsigned little-endian 32bit integer. - /// - /// Constant alias for string: `"zenoh/uint32"`. - /// - /// Usually used for types: `u32`. - pub const ZENOH_UINT32: Encoding = Self(zenoh_protocol::core::Encoding { - id: 8, - schema: None, - }); - /// A VLE-encoded unsigned little-endian 64bit integer. - /// - /// Constant alias for string: `"zenoh/uint64"`. - /// - /// Usually used for types: `u64`. - pub const ZENOH_UINT64: Encoding = Self(zenoh_protocol::core::Encoding { - id: 9, - schema: None, - }); - /// A VLE-encoded unsigned little-endian 128bit integer. - /// - /// Constant alias for string: `"zenoh/uint128"`. - /// - /// Usually used for types: `u128`. - pub const ZENOH_UINT128: Encoding = Self(zenoh_protocol::core::Encoding { - id: 10, - schema: None, - }); - /// A VLE-encoded 32bit float. Binary representation uses *IEEE 754-2008* *binary32* . - /// - /// Constant alias for string: `"zenoh/float32"`. - /// - /// Usually used for types: `f32`. - pub const ZENOH_FLOAT32: Encoding = Self(zenoh_protocol::core::Encoding { - id: 11, - schema: None, - }); - /// A VLE-encoded 64bit float. Binary representation uses *IEEE 754-2008* *binary64*. - /// - /// Constant alias for string: `"zenoh/float64"`. - /// - /// Usually used for types: `f64`. - pub const ZENOH_FLOAT64: Encoding = Self(zenoh_protocol::core::Encoding { - id: 12, - schema: None, - }); - /// A boolean. `0` is `false`, `1` is `true`. Other values are invalid. - /// - /// Constant alias for string: `"zenoh/bool"`. - /// - /// Usually used for types: `bool`. - pub const ZENOH_BOOL: Encoding = Self(zenoh_protocol::core::Encoding { - id: 13, - schema: None, - }); /// A UTF-8 string. /// /// Constant alias for string: `"zenoh/string"`. /// - /// Usually used for types: `String`, `&str`, `Cow`, `char`. + /// This encoding supposes that the payload was created with [`ZBytes::from::`](crate::bytes::ZBytes::from) or similar + /// (`&str`, `Cow`, `char`) and it's data can be acquired with [`ZBytes::try_to_string()`](crate::bytes::ZBytes::try_to_string) without an error. pub const ZENOH_STRING: Encoding = Self(zenoh_protocol::core::Encoding { - id: 14, + id: 1, schema: None, }); - /// A zenoh error. + /// Zenoh serialized data. /// - /// Constant alias for string: `"zenoh/error"`. + /// Constant alias for string: `"zenoh/serialized"`. /// - /// Usually used for types: `ReplyError`. - pub const ZENOH_ERROR: Encoding = Self(zenoh_protocol::core::Encoding { - id: 15, + /// This encoding supposes that the payload created with serialization functions provided by `zenoh-ext` crate. + /// The `schema` field may contain the details of the serialization format. + pub const ZENOH_SERIALIZED: Encoding = Self(zenoh_protocol::core::Encoding { + id: 2, schema: None, }); - // - Advanced types may be supported in some of the Zenoh bindings. /// An application-specific stream of bytes. /// @@ -582,21 +467,8 @@ impl Encoding { const ID_TO_STR: phf::Map = phf_map! { 0u16 => "zenoh/bytes", - 1u16 => "zenoh/int8", - 2u16 => "zenoh/int16", - 3u16 => "zenoh/int32", - 4u16 => "zenoh/int64", - 5u16 => "zenoh/int128", - 6u16 => "zenoh/uint8", - 7u16 => "zenoh/uint16", - 8u16 => "zenoh/uint32", - 9u16 => "zenoh/uint64", - 10u16 => "zenoh/uint128", - 11u16 => "zenoh/float32", - 12u16 => "zenoh/float64", - 13u16 => "zenoh/bool", - 14u16 => "zenoh/string", - 15u16 => "zenoh/error", + 1u16 => "zenoh/string", + 2u16 => "zenoh/serialized", 16u16 => "application/octet-stream", 17u16 => "text/plain", 18u16 => "application/json", @@ -651,21 +523,8 @@ impl Encoding { const STR_TO_ID: phf::Map<&'static str, EncodingId> = phf_map! { "zenoh/bytes" => 0u16, - "zenoh/int8" => 1u16, - "zenoh/int16" => 2u16, - "zenoh/int32" => 3u16, - "zenoh/int64" => 4u16, - "zenoh/int128" => 5u16, - "zenoh/uint8" => 6u16, - "zenoh/uint16" => 7u16, - "zenoh/uint32" => 8u16, - "zenoh/uint64" => 9u16, - "zenoh/uint128" => 10u16, - "zenoh/float32" => 11u16, - "zenoh/float64" => 12u16, - "zenoh/bool" => 13u16, - "zenoh/string" => 14u16, - "zenoh/error" => 15u16, + "zenoh/string" => 1u16, + "zenoh/serialized" => 2u16, "application/octet-stream" => 16u16, "text/plain" => 17u16, "application/json" => 18u16, @@ -879,84 +738,6 @@ impl EncodingMapping for Cow<'_, str> { const ENCODING: Encoding = Encoding::ZENOH_STRING; } -// Zenoh unsigned integers -impl EncodingMapping for u8 { - const ENCODING: Encoding = Encoding::ZENOH_UINT8; -} - -impl EncodingMapping for u16 { - const ENCODING: Encoding = Encoding::ZENOH_UINT16; -} - -impl EncodingMapping for u32 { - const ENCODING: Encoding = Encoding::ZENOH_UINT32; -} - -impl EncodingMapping for u64 { - const ENCODING: Encoding = Encoding::ZENOH_UINT64; -} - -impl EncodingMapping for u128 { - const ENCODING: Encoding = Encoding::ZENOH_UINT128; -} - -impl EncodingMapping for usize { - #[cfg(target_pointer_width = "16")] - const ENCODING: Encoding = Encoding::ZENOH_UINT16; - #[cfg(target_pointer_width = "32")] - const ENCODING: Encoding = Encoding::ZENOH_UINT32; - #[cfg(target_pointer_width = "64")] - const ENCODING: Encoding = Encoding::ZENOH_UINT64; -} - -// Zenoh signed integers -impl EncodingMapping for i8 { - const ENCODING: Encoding = Encoding::ZENOH_INT8; -} - -impl EncodingMapping for i16 { - const ENCODING: Encoding = Encoding::ZENOH_INT16; -} - -impl EncodingMapping for i32 { - const ENCODING: Encoding = Encoding::ZENOH_INT32; -} - -impl EncodingMapping for i64 { - const ENCODING: Encoding = Encoding::ZENOH_INT64; -} - -impl EncodingMapping for i128 { - const ENCODING: Encoding = Encoding::ZENOH_INT128; -} - -impl EncodingMapping for isize { - #[cfg(target_pointer_width = "8")] - const ENCODING: Encoding = Encoding::ZENOH_INT8; - #[cfg(target_pointer_width = "16")] - const ENCODING: Encoding = Encoding::ZENOH_INT16; - #[cfg(target_pointer_width = "32")] - const ENCODING: Encoding = Encoding::ZENOH_INT32; - #[cfg(target_pointer_width = "64")] - const ENCODING: Encoding = Encoding::ZENOH_INT64; - #[cfg(target_pointer_width = "128")] - const ENCODING: Encoding = Encoding::ZENOH_INT128; -} - -// Zenoh floats -impl EncodingMapping for f32 { - const ENCODING: Encoding = Encoding::ZENOH_FLOAT32; -} - -impl EncodingMapping for f64 { - const ENCODING: Encoding = Encoding::ZENOH_FLOAT64; -} - -// Zenoh bool -impl EncodingMapping for bool { - const ENCODING: Encoding = Encoding::ZENOH_BOOL; -} - // - Zenoh advanced types encoders/decoders impl EncodingMapping for serde_json::Value { const ENCODING: Encoding = Encoding::APPLICATION_JSON; From 4a09d7e480f04a2bfc836926adc7a4df960a59a6 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 7 Oct 2024 19:10:33 +0200 Subject: [PATCH 2/8] number changed, unused mappings removed --- zenoh/src/api/encoding.rs | 86 +++++---------------------------------- 1 file changed, 10 insertions(+), 76 deletions(-) diff --git a/zenoh/src/api/encoding.rs b/zenoh/src/api/encoding.rs index 9fef0b811..2bd961e02 100644 --- a/zenoh/src/api/encoding.rs +++ b/zenoh/src/api/encoding.rs @@ -14,13 +14,11 @@ use std::{borrow::Cow, convert::Infallible, fmt, str::FromStr}; use phf::phf_map; -use zenoh_buffers::{ZBuf, ZSlice}; +use zenoh_buffers::ZSlice; use zenoh_protocol::core::EncodingId; #[cfg(feature = "shared-memory")] use zenoh_shm::api::buffer::{zshm::ZShm, zshmmut::ZShmMut}; -use super::bytes::ZBytes; - /// Default encoding values used by Zenoh. /// /// An encoding has a similar role to *Content-type* in HTTP: it indicates, when present, how data should be interpreted by the application. @@ -61,7 +59,7 @@ use super::bytes::ZBytes; /// ### Schema /// /// Additionally, a schema can be associated to the encoding. -/// The conventions is to use the `;` separator if an encoding is created from a string. +/// The convention is to use the `;` separator if an encoding is created from a string. /// Alternatively, [`with_schema()`](Encoding::with_schema) can be used to add a scheme to one of the associated constants. /// ``` /// use zenoh::bytes::Encoding; @@ -102,14 +100,17 @@ impl Encoding { id: 1, schema: None, }); + + // ids 2..15 are reserved for possible future zenoh encoding types + /// Zenoh serialized data. /// - /// Constant alias for string: `"zenoh/serialized"`. + /// Constant alias for string: `"zenoh/serialization"`. /// /// This encoding supposes that the payload created with serialization functions provided by `zenoh-ext` crate. /// The `schema` field may contain the details of the serialization format. pub const ZENOH_SERIALIZED: Encoding = Self(zenoh_protocol::core::Encoding { - id: 2, + id: 15, schema: None, }); // - Advanced types may be supported in some of the Zenoh bindings. @@ -468,7 +469,7 @@ impl Encoding { const ID_TO_STR: phf::Map = phf_map! { 0u16 => "zenoh/bytes", 1u16 => "zenoh/string", - 2u16 => "zenoh/serialized", + 15u16 => "zenoh/serialized", 16u16 => "application/octet-stream", 17u16 => "text/plain", 18u16 => "application/json", @@ -524,7 +525,7 @@ impl Encoding { const STR_TO_ID: phf::Map<&'static str, EncodingId> = phf_map! { "zenoh/bytes" => 0u16, "zenoh/string" => 1u16, - "zenoh/serialized" => 2u16, + "zenoh/serialized" => 15u16, "application/octet-stream" => 16u16, "text/plain" => 17u16, "application/json" => 18u16, @@ -698,63 +699,6 @@ impl fmt::Display for Encoding { } } -#[allow(dead_code)] -// - Encoding trait -pub trait EncodingMapping { - const ENCODING: Encoding; -} - -// Bytes -impl EncodingMapping for ZBytes { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} - -impl EncodingMapping for ZBuf { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} - -impl EncodingMapping for Vec { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} - -impl EncodingMapping for &[u8] { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} - -impl EncodingMapping for Cow<'_, [u8]> { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} - -// String -impl EncodingMapping for String { - const ENCODING: Encoding = Encoding::ZENOH_STRING; -} - -impl EncodingMapping for &str { - const ENCODING: Encoding = Encoding::ZENOH_STRING; -} - -impl EncodingMapping for Cow<'_, str> { - const ENCODING: Encoding = Encoding::ZENOH_STRING; -} - -// - Zenoh advanced types encoders/decoders -impl EncodingMapping for serde_json::Value { - const ENCODING: Encoding = Encoding::APPLICATION_JSON; -} - -impl EncodingMapping for serde_yaml::Value { - const ENCODING: Encoding = Encoding::APPLICATION_YAML; -} - -impl EncodingMapping for serde_cbor::Value { - const ENCODING: Encoding = Encoding::APPLICATION_CBOR; -} - -impl EncodingMapping for serde_pickle::Value { - const ENCODING: Encoding = Encoding::APPLICATION_PYTHON_SERIALIZED_OBJECT; -} - impl Encoding { #[zenoh_macros::internal] pub fn id(&self) -> EncodingId { @@ -768,14 +712,4 @@ impl Encoding { pub fn new(id: EncodingId, schema: Option) -> Self { Encoding(zenoh_protocol::core::Encoding { id, schema }) } -} - -// - Zenoh SHM -#[cfg(feature = "shared-memory")] -impl EncodingMapping for ZShm { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} -#[cfg(feature = "shared-memory")] -impl EncodingMapping for ZShmMut { - const ENCODING: Encoding = Encoding::ZENOH_BYTES; -} +} \ No newline at end of file From 00d60e24c196868c2becfaf6ed6688fba9547b3a Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 7 Oct 2024 23:01:18 +0200 Subject: [PATCH 3/8] cargo fmt --- zenoh/src/api/encoding.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenoh/src/api/encoding.rs b/zenoh/src/api/encoding.rs index 2bd961e02..e2aa2f1d1 100644 --- a/zenoh/src/api/encoding.rs +++ b/zenoh/src/api/encoding.rs @@ -712,4 +712,4 @@ impl Encoding { pub fn new(id: EncodingId, schema: Option) -> Self { Encoding(zenoh_protocol::core::Encoding { id, schema }) } -} \ No newline at end of file +} From a86b83e3391954b8a75b1241061ae218e5f94643 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 7 Oct 2024 23:07:59 +0200 Subject: [PATCH 4/8] clippy fix --- zenoh/src/api/encoding.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/zenoh/src/api/encoding.rs b/zenoh/src/api/encoding.rs index e2aa2f1d1..48e3785d1 100644 --- a/zenoh/src/api/encoding.rs +++ b/zenoh/src/api/encoding.rs @@ -16,8 +16,6 @@ use std::{borrow::Cow, convert::Infallible, fmt, str::FromStr}; use phf::phf_map; use zenoh_buffers::ZSlice; use zenoh_protocol::core::EncodingId; -#[cfg(feature = "shared-memory")] -use zenoh_shm::api::buffer::{zshm::ZShm, zshmmut::ZShmMut}; /// Default encoding values used by Zenoh. /// From 301e99c44b58139ec66d54f7d70d6a5883c3a3cb Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 7 Oct 2024 23:49:50 +0200 Subject: [PATCH 5/8] unused crates removed --- Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 23b384e48..9a58b76a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -156,10 +156,7 @@ secrecy = { version = "0.8.0", features = ["serde", "alloc"] } serde = { version = "1.0.210", default-features = false, features = [ "derive", ] } # Default features are disabled due to usage in no_std crates -serde_cbor = "0.11.2" serde_json = "1.0.128" -serde-pickle = "1.1.1" -serde_yaml = "0.9.34" static_init = "1.0.3" stabby = "36.1.1" sha3 = "0.10.8" From 63eb1eda5e444d874dd199c110749dea7095a6ef Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 7 Oct 2024 23:58:18 +0200 Subject: [PATCH 6/8] cargo toml corrected --- Cargo.lock | 39 +-------------------------------------- Cargo.toml | 1 + zenoh/Cargo.toml | 2 -- 3 files changed, 2 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2387bd28d..8b1a25252 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -787,7 +787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.4.1", + "half", ] [[package]] @@ -1601,12 +1601,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "half" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" - [[package]] name = "half" version = "2.4.1" @@ -1957,12 +1951,6 @@ dependencies = [ "nom", ] -[[package]] -name = "iter-read" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c397ca3ea05ad509c4ec451fea28b4771236a376ca1c69fd5143aae0cf8f93c4" - [[package]] name = "itertools" version = "0.10.5" @@ -3704,29 +3692,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-pickle" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762ad136a26407c6a80825813600ceeab5e613660d93d79a41f0ec877171e71" -dependencies = [ - "byteorder", - "iter-read", - "num-bigint", - "num-traits", - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half 1.8.3", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.210" @@ -5488,8 +5453,6 @@ dependencies = [ "rand 0.8.5", "rustc_version 0.4.1", "serde", - "serde-pickle", - "serde_cbor", "serde_json", "serde_yaml", "socket2 0.5.7", diff --git a/Cargo.toml b/Cargo.toml index 9a58b76a0..eef6f1ef4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,6 +157,7 @@ serde = { version = "1.0.210", default-features = false, features = [ "derive", ] } # Default features are disabled due to usage in no_std crates serde_json = "1.0.128" +serde_yaml = "0.9.34" static_init = "1.0.3" stabby = "36.1.1" sha3 = "0.10.8" diff --git a/zenoh/Cargo.toml b/zenoh/Cargo.toml index b1bc3e5fb..b9bf0b20d 100644 --- a/zenoh/Cargo.toml +++ b/zenoh/Cargo.toml @@ -85,9 +85,7 @@ petgraph = { workspace = true } phf = { workspace = true } rand = { workspace = true, features = ["default"] } serde = { workspace = true, features = ["default"] } -serde_cbor = { workspace = true } serde_json = { workspace = true } -serde-pickle = { workspace = true } serde_yaml = { workspace = true } socket2 = { workspace = true } uhlc = { workspace = true, features = ["default"] } From b7791be16bca264f24048aaed5c3a5ae13bfac04 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Tue, 8 Oct 2024 00:11:28 +0200 Subject: [PATCH 7/8] cargo toml correction --- Cargo.lock | 1 - zenoh/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b1a25252..94542bf63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5454,7 +5454,6 @@ dependencies = [ "rustc_version 0.4.1", "serde", "serde_json", - "serde_yaml", "socket2 0.5.7", "tokio", "tokio-util", diff --git a/zenoh/Cargo.toml b/zenoh/Cargo.toml index b9bf0b20d..94f6d6eb4 100644 --- a/zenoh/Cargo.toml +++ b/zenoh/Cargo.toml @@ -86,7 +86,6 @@ phf = { workspace = true } rand = { workspace = true, features = ["default"] } serde = { workspace = true, features = ["default"] } serde_json = { workspace = true } -serde_yaml = { workspace = true } socket2 = { workspace = true } uhlc = { workspace = true, features = ["default"] } vec_map = { workspace = true } From c80d26346280d4cb656d8a0b8ddb08bc1ea5bd45 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Tue, 8 Oct 2024 18:28:41 +0200 Subject: [PATCH 8/8] doc fixed --- zenoh/src/api/encoding.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenoh/src/api/encoding.rs b/zenoh/src/api/encoding.rs index 48e3785d1..3b8b35b81 100644 --- a/zenoh/src/api/encoding.rs +++ b/zenoh/src/api/encoding.rs @@ -103,7 +103,7 @@ impl Encoding { /// Zenoh serialized data. /// - /// Constant alias for string: `"zenoh/serialization"`. + /// Constant alias for string: `"zenoh/serialized"`. /// /// This encoding supposes that the payload created with serialization functions provided by `zenoh-ext` crate. /// The `schema` field may contain the details of the serialization format.