Skip to main content

rocketmq_model/
common.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
15pub use crate::topic::TopicFilterType;
16pub use faq::FAQUrl;
17pub mod attribute;
18pub mod base;
19pub mod chain;
20
21pub mod boundary_type;
22pub mod broker;
23pub mod coldctr;
24pub mod compression;
25pub mod config;
26pub mod consistenthash;
27pub mod constant;
28pub mod consumer;
29mod faq;
30pub mod filter;
31pub mod hasher;
32pub mod key_builder;
33pub mod macros;
34pub mod message;
35pub mod mix_all;
36pub mod mq_version;
37pub mod pop_ack_constants;
38pub mod pop_retry_policy;
39pub mod producer;
40
41pub mod running;
42pub mod sys_flag;
43pub use sys_flag::topic_sys_flag as TopicSysFlag;
44
45pub mod entity;
46pub mod lite;
47pub mod tools;
48pub mod topic;
49
50pub struct Pair<T, U> {
51    pub left: T,
52    pub right: U,
53}
54
55impl<T, U> Pair<T, U> {
56    pub fn new(left: T, right: U) -> Self {
57        Self { left, right }
58    }
59}