This repository was archived by the owner on Oct 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Documentation
mattt edited this page Jun 10, 2021
·
12 revisions
Documentation for a Swift declaration.
public struct Documentation: Hashable, Codable Codable, Hashable
The summary.
public var summary: Paragraph?The text segments and callouts that comprise the discussion, if any.
public var discussionParts: [DiscussionPart] = []The documented parameters.
public var parameters: [Parameter] = []The documented return value.
public var returns: Document?The documented error throwing behavior.
public var `throws`: Document?Whether the documentation has any content.
public var isEmpty: Bool Documentation is considered empty if all of the following criteria are met:
-
Its
summaryproperty isnil -
Its
returnsproperty isnil -
Its
throwsproperty isnil -
Its
discussionPartsproperty is empty -
Its
parametersproperty is empty
Create and return documentation from Swift Markup text.
public static func parse(_ text: String?) throws -> Documentation - text: The documentation text in Swift Markup (CommonMark) format.
CommonMark.Document.Error if the provided text can't be parsed.
A structured representation of the documentation.
Generated at 2021-06-10T10:51:02+0000 using swift-doc 1.0.0-rc.1.