STRUCTURE-INFO
STRUCTUREP thing [Function]
Predicate returns true if the given object is represented as a structure (without the use of DEFSTRUCT's :TYPE option). Otherwise, returns false.
STRUCTURE-CONTENTS structure [Function]
Returns an alist of field names (as keywords) and field values showing the contents of the STRUCTURE. The STRUCTURE may be any object for which STRUCTUREP returns true.
(DEFSTRUCT (FRED (:TYPE VECTOR)) (A 1) (B 2) (C 3)) (SETQ FRED (MAKE-FRED)) (STRUCTUREP FRED) => NIL (VECTORP FRED) => T (STRUCTURE-CONTENTS FRED) is undefined
(DEFSTRUCT WILMA (A 1) (B 2) (C 3)) (SETQ WILMA (MAKE-WILMA)) (STRUCTUREP WILMA) => T (STRUCTURE-CONTENTS WILMA) => ((:A . 1) (:B . 2) (:C . 3))
STRUCTUREP is important for implementing a portable pretty printer in a number of ways. STRUCTURE-CONTENTS is less important, but is necessary if a portable pretty printer is to print structures in #S notation.TYPEP x 'STRUCTURE). Most implementations do not go so far as to provide STRUCTUREP, however.
Probably no implementations offer STRUCTURE-CONTENTS in any exported form.
DESCRIBE, or to people writing DESCRIBE-like facilities.
If the CLOS meta-object protocol becomes a standard part of CL, this facility would not be necessary. However, if that protocol is in any way optional, it would be useful to have this interface since it can be implemented using considerably less powerful primitives than that protocol offers.