pub struct SerialRuleConfig {
pub key: String,
pub format: String,
pub cycle: String,
pub initial_value: u64,
pub step: String,
}Expand description
单号规则配置(TOML 可序列化)
Fields§
§key: String规则唯一标识
format: String单号格式,如 “ORD{YYYY}{MM}{DD}{SEQ:8}”
cycle: String循环周期:“no_cycle”、“daily”、“monthly”、“yearly”
initial_value: u64计数器初始值
step: String增量策略:“sequential”(默认)或 “random:max”
Trait Implementations§
Source§impl Clone for SerialRuleConfig
impl Clone for SerialRuleConfig
Source§fn clone(&self) -> SerialRuleConfig
fn clone(&self) -> SerialRuleConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerialRuleConfig
impl Debug for SerialRuleConfig
Source§impl<'de> Deserialize<'de> for SerialRuleConfig
impl<'de> Deserialize<'de> for SerialRuleConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SerialRuleConfig
impl RefUnwindSafe for SerialRuleConfig
impl Send for SerialRuleConfig
impl Sync for SerialRuleConfig
impl Unpin for SerialRuleConfig
impl UnsafeUnpin for SerialRuleConfig
impl UnwindSafe for SerialRuleConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more