diff options
| author | mat <git@matdoes.dev> | 2025-09-20 20:35:16 -1200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-09-20 20:35:16 -1200 |
| commit | 585b51e91a5335eae37bc5af7c0111bb2092b156 (patch) | |
| tree | c1559014df9db20dd625d9fe972d4e9f88317008 /azalea-protocol/src/packets/config | |
| parent | db793448ff8e656ad80859835edc3b89cb547dd2 (diff) | |
| download | azalea-drasl-585b51e91a5335eae37bc5af7c0111bb2092b156.tar.xz | |
more accurate mining and impl PartialEq for packets
Diffstat (limited to 'azalea-protocol/src/packets/config')
29 files changed, 38 insertions, 117 deletions
diff --git a/azalea-protocol/src/packets/config/c_clear_dialog.rs b/azalea-protocol/src/packets/config/c_clear_dialog.rs index 7114cc28..a4945516 100644 --- a/azalea-protocol/src/packets/config/c_clear_dialog.rs +++ b/azalea-protocol/src/packets/config/c_clear_dialog.rs @@ -1,5 +1,5 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] -pub struct ClientboundClearDialog {} +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] +pub struct ClientboundClearDialog; diff --git a/azalea-protocol/src/packets/config/c_cookie_request.rs b/azalea-protocol/src/packets/config/c_cookie_request.rs index 4c57718d..c1a42cac 100644 --- a/azalea-protocol/src/packets/config/c_cookie_request.rs +++ b/azalea-protocol/src/packets/config/c_cookie_request.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundCookieRequest { pub key: ResourceLocation, } diff --git a/azalea-protocol/src/packets/config/c_custom_payload.rs b/azalea-protocol/src/packets/config/c_custom_payload.rs index 3432ac3a..19335264 100644 --- a/azalea-protocol/src/packets/config/c_custom_payload.rs +++ b/azalea-protocol/src/packets/config/c_custom_payload.rs @@ -1,9 +1,8 @@ -use azalea_buf::AzBuf; -use azalea_buf::UnsizedByteArray; +use azalea_buf::{AzBuf, UnsizedByteArray}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, diff --git a/azalea-protocol/src/packets/config/c_custom_report_details.rs b/azalea-protocol/src/packets/config/c_custom_report_details.rs index 5fa375d0..38209dd8 100644 --- a/azalea-protocol/src/packets/config/c_custom_report_details.rs +++ b/azalea-protocol/src/packets/config/c_custom_report_details.rs @@ -1,9 +1,8 @@ -use std::collections::HashMap; - use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; +use indexmap::IndexMap; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundCustomReportDetails { - pub details: HashMap<String, String>, + pub details: IndexMap<String, String>, } diff --git a/azalea-protocol/src/packets/config/c_disconnect.rs b/azalea-protocol/src/packets/config/c_disconnect.rs index b59b318d..37915b38 100644 --- a/azalea-protocol/src/packets/config/c_disconnect.rs +++ b/azalea-protocol/src/packets/config/c_disconnect.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundDisconnect { pub reason: FormattedText, } diff --git a/azalea-protocol/src/packets/config/c_finish_configuration.rs b/azalea-protocol/src/packets/config/c_finish_configuration.rs index ea6e6d27..2cfe64fd 100644 --- a/azalea-protocol/src/packets/config/c_finish_configuration.rs +++ b/azalea-protocol/src/packets/config/c_finish_configuration.rs @@ -1,5 +1,5 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundFinishConfiguration; diff --git a/azalea-protocol/src/packets/config/c_keep_alive.rs b/azalea-protocol/src/packets/config/c_keep_alive.rs index f0310c34..575ff52e 100644 --- a/azalea-protocol/src/packets/config/c_keep_alive.rs +++ b/azalea-protocol/src/packets/config/c_keep_alive.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/config/c_ping.rs b/azalea-protocol/src/packets/config/c_ping.rs index 35b5c39c..82a83692 100644 --- a/azalea-protocol/src/packets/config/c_ping.rs +++ b/azalea-protocol/src/packets/config/c_ping.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundPing { pub id: u32, } diff --git a/azalea-protocol/src/packets/config/c_registry_data.rs b/azalea-protocol/src/packets/config/c_registry_data.rs index 5b43413d..18d2e73b 100644 --- a/azalea-protocol/src/packets/config/c_registry_data.rs +++ b/azalea-protocol/src/packets/config/c_registry_data.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; use simdnbt::owned::NbtCompound; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundRegistryData { pub registry_id: ResourceLocation, pub entries: Vec<(ResourceLocation, Option<NbtCompound>)>, diff --git a/azalea-protocol/src/packets/config/c_reset_chat.rs b/azalea-protocol/src/packets/config/c_reset_chat.rs index 273cb0fd..bd15a79e 100644 --- a/azalea-protocol/src/packets/config/c_reset_chat.rs +++ b/azalea-protocol/src/packets/config/c_reset_chat.rs @@ -1,5 +1,5 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundResetChat; diff --git a/azalea-protocol/src/packets/config/c_resource_pack.rs b/azalea-protocol/src/packets/config/c_resource_pack.rs deleted file mode 100644 index 63a59b5b..00000000 --- a/azalea-protocol/src/packets/config/c_resource_pack.rs +++ /dev/null @@ -1,11 +0,0 @@ -use azalea_buf::AzBuf; -use azalea_chat::FormattedText; -use azalea_protocol_macros::ClientboundConfigPacket; - -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] -pub struct ClientboundResourcePack { - pub url: String, - pub hash: String, - pub required: bool, - pub prompt: Option<FormattedText>, -} diff --git a/azalea-protocol/src/packets/config/c_resource_pack_pop.rs b/azalea-protocol/src/packets/config/c_resource_pack_pop.rs index f949a726..2df9f375 100644 --- a/azalea-protocol/src/packets/config/c_resource_pack_pop.rs +++ b/azalea-protocol/src/packets/config/c_resource_pack_pop.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundResourcePackPop { pub id: Option<Uuid>, } diff --git a/azalea-protocol/src/packets/config/c_resource_pack_push.rs b/azalea-protocol/src/packets/config/c_resource_pack_push.rs index 6be5c709..257cb374 100644 --- a/azalea-protocol/src/packets/config/c_resource_pack_push.rs +++ b/azalea-protocol/src/packets/config/c_resource_pack_push.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundResourcePackPush { pub id: Uuid, pub url: String, diff --git a/azalea-protocol/src/packets/config/c_select_known_packs.rs b/azalea-protocol/src/packets/config/c_select_known_packs.rs index 6a4f76db..c8b17413 100644 --- a/azalea-protocol/src/packets/config/c_select_known_packs.rs +++ b/azalea-protocol/src/packets/config/c_select_known_packs.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ClientboundConfigPacket; use super::s_select_known_packs::KnownPack; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundSelectKnownPacks { pub known_packs: Vec<KnownPack>, } diff --git a/azalea-protocol/src/packets/config/c_server_links.rs b/azalea-protocol/src/packets/config/c_server_links.rs index 3420e592..e459e901 100644 --- a/azalea-protocol/src/packets/config/c_server_links.rs +++ b/azalea-protocol/src/packets/config/c_server_links.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ClientboundConfigPacket; use crate::common::server_links::ServerLinkEntry; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundServerLinks { pub links: Vec<ServerLinkEntry>, } diff --git a/azalea-protocol/src/packets/config/c_show_dialog.rs b/azalea-protocol/src/packets/config/c_show_dialog.rs index aacc2816..7d1ad498 100644 --- a/azalea-protocol/src/packets/config/c_show_dialog.rs +++ b/azalea-protocol/src/packets/config/c_show_dialog.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; use simdnbt::owned::Nbt; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundShowDialog { pub dialog: Nbt, } diff --git a/azalea-protocol/src/packets/config/c_store_cookie.rs b/azalea-protocol/src/packets/config/c_store_cookie.rs index c52211ea..5fa03729 100644 --- a/azalea-protocol/src/packets/config/c_store_cookie.rs +++ b/azalea-protocol/src/packets/config/c_store_cookie.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundStoreCookie { pub key: ResourceLocation, pub payload: Vec<u8>, diff --git a/azalea-protocol/src/packets/config/c_transfer.rs b/azalea-protocol/src/packets/config/c_transfer.rs index 332421d8..db0e846a 100644 --- a/azalea-protocol/src/packets/config/c_transfer.rs +++ b/azalea-protocol/src/packets/config/c_transfer.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundTransfer { pub host: String, #[var] diff --git a/azalea-protocol/src/packets/config/c_update_enabled_features.rs b/azalea-protocol/src/packets/config/c_update_enabled_features.rs index 4529c757..7d86ceb4 100644 --- a/azalea-protocol/src/packets/config/c_update_enabled_features.rs +++ b/azalea-protocol/src/packets/config/c_update_enabled_features.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundUpdateEnabledFeatures { pub features: Vec<ResourceLocation>, } diff --git a/azalea-protocol/src/packets/config/c_update_tags.rs b/azalea-protocol/src/packets/config/c_update_tags.rs index 750e3499..5c306374 100644 --- a/azalea-protocol/src/packets/config/c_update_tags.rs +++ b/azalea-protocol/src/packets/config/c_update_tags.rs @@ -1,74 +1,9 @@ -use std::io::{self, Cursor}; -use std::ops::Deref; -use std::{collections::HashMap, io::Write}; - -use azalea_buf::{AzBuf, AzaleaReadVar, AzaleaWriteVar, BufReadError}; -use azalea_buf::{AzaleaRead, AzaleaWrite}; -use azalea_core::resource_location::ResourceLocation; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +use crate::common::tags::TagMap; + +#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundConfigPacket)] pub struct ClientboundUpdateTags { pub tags: TagMap, } - -#[derive(Clone, Debug)] -pub struct Tags { - pub name: ResourceLocation, - pub elements: Vec<i32>, -} - -#[derive(Clone, Debug)] -pub struct TagMap(pub HashMap<ResourceLocation, Vec<Tags>>); - -impl AzaleaRead for TagMap { - fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { - let length = u32::azalea_read_var(buf)? as usize; - let mut data = HashMap::with_capacity(length); - for _ in 0..length { - let tag_type = ResourceLocation::azalea_read(buf)?; - let tags_count = i32::azalea_read_var(buf)? as usize; - let mut tags_vec = Vec::with_capacity(tags_count); - for _ in 0..tags_count { - let tags = Tags::azalea_read(buf)?; - tags_vec.push(tags); - } - data.insert(tag_type, tags_vec); - } - Ok(TagMap(data)) - } -} - -impl AzaleaWrite for TagMap { - fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { - (self.len() as u32).azalea_write_var(buf)?; - for (k, v) in &self.0 { - k.azalea_write(buf)?; - v.azalea_write(buf)?; - } - Ok(()) - } -} -impl AzaleaRead for Tags { - fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { - let name = ResourceLocation::azalea_read(buf)?; - let elements = Vec::<i32>::azalea_read_var(buf)?; - Ok(Tags { name, elements }) - } -} - -impl AzaleaWrite for Tags { - fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { - self.name.azalea_write(buf)?; - self.elements.azalea_write_var(buf)?; - Ok(()) - } -} - -impl Deref for TagMap { - type Target = HashMap<ResourceLocation, Vec<Tags>>; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} diff --git a/azalea-protocol/src/packets/config/s_client_information.rs b/azalea-protocol/src/packets/config/s_client_information.rs index d58ce502..b6ab0f2a 100644 --- a/azalea-protocol/src/packets/config/s_client_information.rs +++ b/azalea-protocol/src/packets/config/s_client_information.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ServerboundConfigPacket; use crate::common::client_information::ClientInformation; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket, PartialEq, Eq)] +#[derive(Clone, Debug, AzBuf, PartialEq, Eq, ServerboundConfigPacket)] pub struct ServerboundClientInformation { pub information: ClientInformation, } diff --git a/azalea-protocol/src/packets/config/s_cookie_response.rs b/azalea-protocol/src/packets/config/s_cookie_response.rs index e932352f..590a651e 100644 --- a/azalea-protocol/src/packets/config/s_cookie_response.rs +++ b/azalea-protocol/src/packets/config/s_cookie_response.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundCookieResponse { pub key: ResourceLocation, pub payload: Option<Vec<u8>>, diff --git a/azalea-protocol/src/packets/config/s_custom_click_action.rs b/azalea-protocol/src/packets/config/s_custom_click_action.rs index eee03303..0c33d635 100644 --- a/azalea-protocol/src/packets/config/s_custom_click_action.rs +++ b/azalea-protocol/src/packets/config/s_custom_click_action.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundConfigPacket; use simdnbt::owned::Nbt; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundCustomClickAction { pub id: ResourceLocation, pub payload: Nbt, diff --git a/azalea-protocol/src/packets/config/s_custom_payload.rs b/azalea-protocol/src/packets/config/s_custom_payload.rs index f480985d..fec04fb5 100644 --- a/azalea-protocol/src/packets/config/s_custom_payload.rs +++ b/azalea-protocol/src/packets/config/s_custom_payload.rs @@ -1,9 +1,8 @@ -use azalea_buf::AzBuf; -use azalea_buf::UnsizedByteArray; +use azalea_buf::{AzBuf, UnsizedByteArray}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, diff --git a/azalea-protocol/src/packets/config/s_finish_configuration.rs b/azalea-protocol/src/packets/config/s_finish_configuration.rs index dc7d4316..618d7205 100644 --- a/azalea-protocol/src/packets/config/s_finish_configuration.rs +++ b/azalea-protocol/src/packets/config/s_finish_configuration.rs @@ -1,5 +1,5 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundFinishConfiguration; diff --git a/azalea-protocol/src/packets/config/s_keep_alive.rs b/azalea-protocol/src/packets/config/s_keep_alive.rs index 1986a4eb..455d4109 100644 --- a/azalea-protocol/src/packets/config/s_keep_alive.rs +++ b/azalea-protocol/src/packets/config/s_keep_alive.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/config/s_pong.rs b/azalea-protocol/src/packets/config/s_pong.rs index 50c012dd..58abaff4 100644 --- a/azalea-protocol/src/packets/config/s_pong.rs +++ b/azalea-protocol/src/packets/config/s_pong.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundPong { pub id: u32, } diff --git a/azalea-protocol/src/packets/config/s_resource_pack.rs b/azalea-protocol/src/packets/config/s_resource_pack.rs index 0822c723..38a14af8 100644 --- a/azalea-protocol/src/packets/config/s_resource_pack.rs +++ b/azalea-protocol/src/packets/config/s_resource_pack.rs @@ -2,13 +2,13 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundResourcePack { pub id: Uuid, pub action: Action, } -#[derive(AzBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug, PartialEq, Eq)] pub enum Action { SuccessfullyLoaded = 0, Declined = 1, diff --git a/azalea-protocol/src/packets/config/s_select_known_packs.rs b/azalea-protocol/src/packets/config/s_select_known_packs.rs index 320b5ca5..ee139780 100644 --- a/azalea-protocol/src/packets/config/s_select_known_packs.rs +++ b/azalea-protocol/src/packets/config/s_select_known_packs.rs @@ -1,12 +1,12 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, PartialEq, ServerboundConfigPacket)] pub struct ServerboundSelectKnownPacks { pub known_packs: Vec<KnownPack>, } -#[derive(Clone, Debug, AzBuf)] +#[derive(Clone, Debug, AzBuf, PartialEq)] pub struct KnownPack { pub namespace: String, pub id: String, |
