From f81006465728543e2ba5f166790c900d1ce5dd21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 2 Oct 2026 19:13:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3(=E8=AE=A1=E8=B4=B9):=20?= =?UTF-8?q?=E6=BE=84=E6=B8=85=E6=A1=A3=E4=BD=8D=E6=8E=92=E5=BA=8F=E4=BB=A5?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=20rank=20=E4=B8=BA=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RuntimeProfileMembershipPlan 文档改为说明排序由目录 rank 决定、枚举不实现 Ord,避免误以为变体顺序是排序契约 Co-authored-by: Junie --- server-rs/crates/module-runtime/src/domain.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server-rs/crates/module-runtime/src/domain.rs b/server-rs/crates/module-runtime/src/domain.rs index dd5f8d519..d1919d53c 100644 --- a/server-rs/crates/module-runtime/src/domain.rs +++ b/server-rs/crates/module-runtime/src/domain.rs @@ -1233,7 +1233,10 @@ impl RuntimeProfileMembershipStatus { /// 会员档位身份。取代旧的 `RuntimeProfileMembershipTier`,作为唯一权威档位标识。 /// -/// 变体顺序即排序基准(`Normal < Starter < Plus < Pro < Max`)。对外 wire 只用 +/// 档位高低由目录表的 `rank` 决定(见 +/// [`runtime_profile_membership_plan_rank`](crate::runtime_profile_membership_plan_rank)); +/// 本枚举不实现 `PartialOrd` / `Ord`,变体声明顺序不构成排序契约(当前恰与 `rank` 一致), +/// 升级比较一律以目录 `rank` 为唯一来源。对外 wire 只用 /// [`RuntimeProfileMembershipPlan::as_str`] 产出的枚举 token。 #[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))] #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]