pub enum Version {
V1,
V2,
V3,
}Expand description
SML 语法版本
SML 源于 eclog,演进中通过 @version 声明文档遵循的语法版本,
使解析器能在将来引入 v2 不兼容语法时仍正确读取旧文档。
Variants§
V1
v1:初始公开版本。字符串可裸写(name: John),自动识别类型。
V2
v2:草案版,引入「字符串必须显式引号」的不兼容语法(与 v3 同语义)。
V3
v3:正式版。取消自动字符串无引号,自由文本必须写作 "...";
数字 / bool / null / 片段引用 &x / 环境变量 $env.X 仍为裸词。
Implementations§
Trait Implementations§
impl Copy for Version
impl Eq for Version
Source§impl Ord for Version
impl Ord for Version
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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