pub enum FreeBuiltinKind {
Constructor,
Assertion,
}Expand description
What a builtin that is called on nothing is.
The two kinds are not variations of one thing — a constructor makes a value and an assertion checks one — and both ends of the toolchain ask which is which before anything else: the interpreter dispatches an assertion through the one path that carries the source text of its arguments, and the checker gives an assertion’s arity a different sentence than a constructor’s. So the kind is in the table rather than derived from the name.
Variants§
Constructor
Ok(value), Err(error), Some(value), Error("message"), and
Shared(value): a name that builds a builtin value out of one
payload.
Assertion
assert(condition) and assertEqual(actual, expected): a name a test
calls, which reports failure as an ordinary Err.
Trait Implementations§
Source§impl Clone for FreeBuiltinKind
impl Clone for FreeBuiltinKind
Source§fn clone(&self) -> FreeBuiltinKind
fn clone(&self) -> FreeBuiltinKind
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 moreimpl Copy for FreeBuiltinKind
Source§impl Debug for FreeBuiltinKind
impl Debug for FreeBuiltinKind
impl Eq for FreeBuiltinKind
Source§impl PartialEq for FreeBuiltinKind
impl PartialEq for FreeBuiltinKind
Source§fn eq(&self, other: &FreeBuiltinKind) -> bool
fn eq(&self, other: &FreeBuiltinKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FreeBuiltinKind
Auto Trait Implementations§
impl Freeze for FreeBuiltinKind
impl RefUnwindSafe for FreeBuiltinKind
impl Send for FreeBuiltinKind
impl Sync for FreeBuiltinKind
impl Unpin for FreeBuiltinKind
impl UnsafeUnpin for FreeBuiltinKind
impl UnwindSafe for FreeBuiltinKind
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