Skip to main content

rocketmq_remoting/protocol/header/
message_operation_header.rs

1// Copyright 2023 The RocketMQ Rust Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use cheetah_string::CheetahString;
16
17pub mod send_message_request_header;
18pub mod send_message_request_header_v2;
19pub mod send_message_response_header;
20
21pub trait TopicRequestHeaderTrait: Sync + Send {
22    fn set_lo(&mut self, lo: Option<bool>);
23
24    fn lo(&self) -> Option<bool>;
25
26    fn set_topic(&mut self, topic: CheetahString);
27
28    fn topic(&self) -> &CheetahString;
29
30    fn broker_name(&self) -> Option<&CheetahString>;
31
32    fn set_broker_name(&mut self, broker_name: CheetahString);
33
34    fn namespace(&self) -> Option<&str>;
35
36    fn set_namespace(&mut self, namespace: CheetahString);
37
38    fn namespaced(&self) -> Option<bool>;
39
40    fn set_namespaced(&mut self, namespaced: bool);
41
42    fn oneway(&self) -> Option<bool>;
43
44    fn set_oneway(&mut self, oneway: bool);
45
46    fn queue_id(&self) -> i32;
47
48    fn set_queue_id(&mut self, queue_id: i32);
49}