#[repr(C)]pub enum SchemaIdentity {
Anonymous,
Nominal(&'static str),
}Expand description
Which type a record schema describes — the half of a record’s identity that its field list cannot express.
struct Point { x: Int, y: Int } and struct Vector { x: Int, y: Int } are
different types with one shape, and §5.6’s anonymous records are the
opposite case: the same shape is the same type, however many times it is
built. One enum distinguishes them.
A nominal identity is the declared name, so it is compared alongside the
shape (see RecordSchema::same_type) to keep a generic record’s two
instantiations from colliding.
Variants§
Anonymous
A structural record (§5.6): identity is the field shape alone. What the input parser’s named-capture templates produce.
Nominal(&'static str)
A declared record type. Two schemas are the same type only if they name the same one.
Trait Implementations§
Source§impl Clone for SchemaIdentity
impl Clone for SchemaIdentity
Source§fn clone(&self) -> SchemaIdentity
fn clone(&self) -> SchemaIdentity
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 SchemaIdentity
Source§impl Debug for SchemaIdentity
impl Debug for SchemaIdentity
impl Eq for SchemaIdentity
Source§impl PartialEq for SchemaIdentity
impl PartialEq for SchemaIdentity
impl StructuralPartialEq for SchemaIdentity
Auto Trait Implementations§
impl Freeze for SchemaIdentity
impl RefUnwindSafe for SchemaIdentity
impl Send for SchemaIdentity
impl Sync for SchemaIdentity
impl Unpin for SchemaIdentity
impl UnsafeUnpin for SchemaIdentity
impl UnwindSafe for SchemaIdentity
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