WritableDocument
A type that you use to write documents to file.
Declaration
protocol WritableDocument : AnyObjectOverview
Conform to WritableDocument in addition to ReadableDocument to support saving. You can also conform your type to Document protocol which conforms both to WritableDocument and ReadableDocument.
Your implementation:
Provides writable content types via writableContentTypes.
Provides a snapshot of the current document state via snapshot(contentType:).
Writes the snapshot to disk using a DocumentWriter returned by writer(configuration:).