pub struct FieldSchema {
pub name: &'static str,
pub ty: BuiltinType,
}Expand description
One field of a builtin struct.
Error and MapEntry are structs the language builds rather than a
module declares, and a program reads them the ordinary way, by field. The
runtime has always built both — a Value::Struct with the fields below —
so what this adds is the half the checker was missing: what the runtime
builds, written down where the checker can read it.
This is FieldSchema in the builtin vocabulary,
carrying a BuiltinType because a builtin struct may be generic:
MapEntry<K, V>’s two fields are its two type parameters.
Fields§
§name: &'static strThe label Cove source writes to read the field, such as message.
ty: BuiltinTypeThe field’s type.
Trait Implementations§
Source§impl Clone for FieldSchema
impl Clone for FieldSchema
Source§fn clone(&self) -> FieldSchema
fn clone(&self) -> FieldSchema
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 FieldSchema
Source§impl Debug for FieldSchema
impl Debug for FieldSchema
impl Eq for FieldSchema
Source§impl PartialEq for FieldSchema
impl PartialEq for FieldSchema
Source§fn eq(&self, other: &FieldSchema) -> bool
fn eq(&self, other: &FieldSchema) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FieldSchema
Auto Trait Implementations§
impl Freeze for FieldSchema
impl RefUnwindSafe for FieldSchema
impl Send for FieldSchema
impl Sync for FieldSchema
impl Unpin for FieldSchema
impl UnsafeUnpin for FieldSchema
impl UnwindSafe for FieldSchema
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