Documentation

public class Documentation : MultiLineFragment

A MultilineFragment rendered specifically as documentation

  • The formatting used to render this documentation. Either single line or multiline.

    Declaration

    Swift

    public let format: Documentation.Format
  • Creates a MultilineFragment formatted specifically like documentation

    Declaration

    Swift

    @inlinable
    public init(_ content: String, format: Documentation.Format = .singleLine, _ children: () -> CodeRepresentable)

    Parameters

    content

    The main description of the documentation

    format

    The formatting to be used by the content of the documentation. Either single line or multi line

    children

    The other parts of the documentation’s content such as parameters, tag, return value, etc.

  • Renders this Documentation as a string.

    The String format is as follows:

    /// This is a single line documentation format
    
    

    or

     /**
      This is a multiline documentation format
    

    Declaration

    Swift

    @inlinable
    public override func renderContent() -> String
  • An enum representing the two types of documentation formatting

    See more

    Declaration

    Swift

    public enum Format