{"size": 1126, "ext": "scrbl", "max_stars_repo_path": "unstable-doc/scribblings/custom-write.scrbl", "max_stars_repo_name": "racket/unstable", "max_stars_repo_stars_event_min_datetime": "2018-08-24T22:01:32.000Z", "max_stars_repo_stars_event_max_datetime": "2018-08-24T22:01:32.000Z", "max_issues_repo_path": "unstable-doc/scribblings/custom-write.scrbl", "max_issues_repo_name": "racket/unstable", "max_issues_repo_issues_event_min_datetime": "2020-06-25T14:58:07.000Z", "max_issues_repo_issues_event_max_datetime": "2020-06-25T19:01:25.000Z", "max_forks_repo_path": "unstable-doc/scribblings/custom-write.scrbl", "max_forks_repo_name": "racket/unstable", "max_forks_repo_forks_event_min_datetime": "2015-01-20T15:40:24.000Z", "max_forks_repo_forks_event_max_datetime": "2018-08-24T22:01:34.000Z"}
{"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": 4, "avg_line_length": 27.4634146341, "max_line_length": 77, "alphanum_fraction": 0.6856127886}
#lang scribble/doc
@(require scribble/base
          scribble/manual
          scribble/eval
          "utils.rkt"
          (for-label unstable/custom-write
                     racket/base
                     racket/contract
                     racket/pretty))

@title[#:tag "custom-write"]{Struct Printing}

@deprecated[@racketmodname[racket/struct]]{
The contents of this module, with the exceptions below, have been merged with
@racketmodname[racket/struct].
}

@defmodule[unstable/custom-write]

@(define the-eval (make-base-eval))
@(the-eval '(require unstable/custom-write racket/pretty))

@defthing[prop:auto-custom-write
          (struct-type-property/c 'constructor)]{

When attached to a struct type, automatically generates a printer using
@racket[make-constructor-style-printer] and attaches it to the struct type's
@racket[prop:custom-write] property. It also sets the
@racket[prop:custom-print-quotable] property to @racket['never].

@examples[#:eval the-eval
(struct point3 (x y z)
  #:property prop:auto-custom-write 'constructor)
(print (point3 3 4 5))
(write (point3 3 4 5))
]
}


@close-eval[the-eval]
