@@ -17,6 +17,7 @@ use crate::prelude::{AttributeSpecifier, AttributeVerifier};
17
17
use crate :: service:: builder:: OpenDynamicStorageFailure ;
18
18
use crate :: service:: dynamic_config:: request_response:: DynamicConfigSettings ;
19
19
use crate :: service:: port_factory:: request_response;
20
+ use crate :: service:: static_config:: message_type_details:: TypeDetail ;
20
21
use crate :: service:: static_config:: messaging_pattern:: MessagingPattern ;
21
22
use crate :: service:: { self , header, static_config} ;
22
23
use crate :: service:: { builder, dynamic_config, Service } ;
@@ -27,6 +28,7 @@ use iceoryx2_cal::serialize::Serialize;
27
28
use iceoryx2_cal:: static_storage:: { StaticStorage , StaticStorageCreateError , StaticStorageLocked } ;
28
29
29
30
use super :: message_type_details:: { MessageTypeDetails , TypeVariant } ;
31
+ use super :: publish_subscribe:: { CustomHeaderMarker , CustomPayloadMarker } ;
30
32
use super :: { ServiceState , RETRY_LIMIT } ;
31
33
32
34
/// Errors that can occur when an existing [`MessagingPattern::RequestResponse`] [`Service`] shall
@@ -223,6 +225,10 @@ pub struct Builder<
223
225
base : builder:: BuilderWithServiceType < ServiceType > ,
224
226
override_request_alignment : Option < usize > ,
225
227
override_response_alignment : Option < usize > ,
228
+ override_request_payload_type : Option < TypeDetail > ,
229
+ override_response_payload_type : Option < TypeDetail > ,
230
+ override_request_header_type : Option < TypeDetail > ,
231
+ override_response_header_type : Option < TypeDetail > ,
226
232
verify_enable_safe_overflow_for_requests : bool ,
227
233
verify_enable_safe_overflow_for_responses : bool ,
228
234
verify_max_active_requests_per_client : bool ,
@@ -253,6 +259,10 @@ impl<
253
259
base,
254
260
override_request_alignment : None ,
255
261
override_response_alignment : None ,
262
+ override_request_header_type : None ,
263
+ override_request_payload_type : None ,
264
+ override_response_header_type : None ,
265
+ override_response_payload_type : None ,
256
266
verify_enable_safe_overflow_for_requests : false ,
257
267
verify_enable_safe_overflow_for_responses : false ,
258
268
verify_max_loaned_requests : false ,
@@ -1423,3 +1433,46 @@ impl<
1423
1433
self . create_impl ( attributes)
1424
1434
}
1425
1435
}
1436
+
1437
+ impl < ServiceType : Service >
1438
+ Builder <
1439
+ [ CustomPayloadMarker ] ,
1440
+ CustomHeaderMarker ,
1441
+ [ CustomPayloadMarker ] ,
1442
+ CustomHeaderMarker ,
1443
+ ServiceType ,
1444
+ >
1445
+ {
1446
+ #[ doc( hidden) ]
1447
+ pub unsafe fn __internal_set_request_payload_type_details (
1448
+ mut self ,
1449
+ value : & TypeDetail ,
1450
+ ) -> Self {
1451
+ self . override_request_payload_type = Some ( value. clone ( ) ) ;
1452
+ self
1453
+ }
1454
+
1455
+ #[ doc( hidden) ]
1456
+ pub unsafe fn __internal_set_response_payload_type_details (
1457
+ mut self ,
1458
+ value : & TypeDetail ,
1459
+ ) -> Self {
1460
+ self . override_response_payload_type = Some ( value. clone ( ) ) ;
1461
+ self
1462
+ }
1463
+
1464
+ #[ doc( hidden) ]
1465
+ pub unsafe fn __internal_set_request_header_type_details ( mut self , value : & TypeDetail ) -> Self {
1466
+ self . override_request_header_type = Some ( value. clone ( ) ) ;
1467
+ self
1468
+ }
1469
+
1470
+ #[ doc( hidden) ]
1471
+ pub unsafe fn __internal_set_response_header_type_details (
1472
+ mut self ,
1473
+ value : & TypeDetail ,
1474
+ ) -> Self {
1475
+ self . override_response_header_type = Some ( value. clone ( ) ) ;
1476
+ self
1477
+ }
1478
+ }
0 commit comments