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 12
ContainerOfBlocks
mattt edited this page Jan 24, 2020
·
9 revisions
public protocol ContainerOfBlocks: NodeNode, Hashable, Equatable, CustomStringConvertible
Typealias(context: Optional("ContainerOfBlocks"), attributes: [], modifiers: [public], keyword: "typealias", name: "Child", initializedType: Optional("Block & Node"), genericParameters: [], genericRequirements: [])The block's children.
var children: [Child]var description: Stringpublic func hash(into hasher: inout Hasher)public static func ==(lhs: Node, rhs: Node) -> BoolAdds a block to the beginning of the block's children.
@discardableResult public func prepend(child: Child) -> Bool- child: The block to add.
true if successful, otherwise false.
Adds a block to the end of the block's children.
@discardableResult public func append(child: Child) -> Bool- child: The block to add.
true if successful, otherwise false.
Inserts a block to the block's children before a specified sibling.
@discardableResult public func insert(child: Child, before sibling: Child) -> Bool- child: The block to add.
- sibling: The child before which the block is added
true if successful, otherwise false.
Inserts a block to the block's children after a specified sibling.
@discardableResult public func insert(child: Child, after sibling: Child) -> Bool- child: The block to add.
- sibling: The child after which the block is added
true if successful, otherwise false.
Removes a block from the block's children.
@discardableResult public func remove(child: Child) -> Bool- child: The block to remove.
true if successful, otherwise false.
Generated at 2021-03-03T19:19:22+0000 using swift-doc 1.0.0-beta.5.
Types
- BlockQuote
- Code
- CodeBlock
- CommonMarkBuilder
- Document
- Document.Error
- Document.ParsingOptions
- Document.Position
- Emphasis
- ForEach
- Fragment
- HTMLBlock
- HardLineBreak
- Heading
- Image
- Link
- List
- List.Delimiter
- List.Item
- List.Kind
- Node
- Node.RenderingFormat
- Node.RenderingOptions
- Paragraph
- RawHTML
- Section
- SoftLineBreak
- StringBuilder
- Strong
- Text
- ThematicBreak
- VisitorContinueKind