pub enum Instance<S = Str> {
Simple(Record<S>),
Complex(Box<[Record<S>]>),
}Expand description
The body of a #id=...; instance, as written.
Nearly every instance is simple, so a simple one holds its record inline
rather than in a one-element list. A complex instance keeps its records
in source order, and one written in complex form stays complex even when
it holds a single record: #1=(A(1)); writes back as written.
Variants§
Simple(Record<S>)
NAME(...).
Complex(Box<[Record<S>]>)
(A(...)B(...)): the partial records of a complex instance.
Trait Implementations§
impl<S: PartialEq> StructuralPartialEq for Instance<S>
Auto Trait Implementations§
impl<S> Freeze for Instance<S>
impl<S> RefUnwindSafe for Instance<S>
impl<S> Send for Instance<S>
impl<S> Sync for Instance<S>
impl<S> Unpin for Instance<S>
impl<S> UnsafeUnpin for Instance<S>
impl<S> UnwindSafe for Instance<S>
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