pub enum Record<'a> {
Show 20 variants
Meta(Cow<'a, str>),
NameStr {
pre: u32,
str: Cow<'a, str>,
},
NameNum {
pre: u32,
i: u64,
},
Succ(u32),
Max(u32, u32),
IMax(u32, u32),
Param(u32),
BVar(u64),
Sort(u32),
Const {
name: u32,
us: Vec<u32>,
},
App {
fun: u32,
arg: u32,
},
Lam(Binding),
Pi(Binding),
Let {
name: u32,
ty: u32,
value: u32,
body: u32,
nondep: bool,
},
Nat(Cow<'a, str>),
Str(Cow<'a, str>),
Proj {
type_name: u32,
idx: u64,
struct_: u32,
},
MData(u32),
Decl(Decl),
End(Counts),
}Expand description
Ids are implicit: names and levels count from 1 (0 is the anonymous name and the zero level), expressions from 0, each in record order. Records only refer to earlier ones.
Variants§
Meta(Cow<'a, str>)
The meta object as JSON. Always first.
NameStr
NameNum
Succ(u32)
Max(u32, u32)
IMax(u32, u32)
Param(u32)
BVar(u64)
Sort(u32)
Const
App
Lam(Binding)
Pi(Binding)
Let
Nat(Cow<'a, str>)
Decimal digits.
Str(Cow<'a, str>)
Proj
MData(u32)
lean4export’s metadata wrapper, which kernels read as the wrapped term.
Decl(Decl)
End(Counts)
Always last.
Implementations§
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Record<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Record<'a>
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
impl<'a> Eq for Record<'a>
impl<'a> StructuralPartialEq for Record<'a>
Auto Trait Implementations§
impl<'a> Forget for Record<'a>
impl<'a> Freeze for Record<'a>
impl<'a> Move for Record<'a>
impl<'a> RefUnwindSafe for Record<'a>
impl<'a> Send for Record<'a>
impl<'a> Sync for Record<'a>
impl<'a> Unpin for Record<'a>
impl<'a> UnsafeUnpin for Record<'a>
impl<'a> UnwindSafe for Record<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more