Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

ContainerOfInlineElements

mattt edited this page Jan 25, 2020 · 11 revisions

ContainerOfInlineElements

public protocol ContainerOfInlineElements: Node

Inheritance

Node, CustomStringConvertible, Equatable, Hashable


Required Properties

description

var description: String

children

The block's children.

var children: [Inline & Node]

Required Methods

==(lhs:rhs:)

public static func ==(lhs: Node, rhs: Node) -> Bool

prepend(child:)

Adds an inline element to the beginning of the block's children.

@discardableResult public func prepend(child: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.

Returns

true if successful, otherwise false.

append(child:)

Adds an inline element to the end of the block's children.

@discardableResult public func append(child: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.

Returns

true if successful, otherwise false.

insert(child:before:)

Inserts an inline element to the block's children before a specified sibling.

@discardableResult public func insert(child: Inline & Node, before sibling: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.
  • sibling: The child before which the inline element is added

Returns

true if successful, otherwise false.

insert(child:after:)

Inserts an inline element to the block's children after a specified sibling.

@discardableResult public func insert(child: Inline & Node, after sibling: Inline & Node) -> Bool

Parameters

  • child: The inline element to add.
  • sibling: The child after which the inline element is added

Returns

true if successful, otherwise false.

remove(child:)

Removes an inline element from the block's children.

@discardableResult public func remove(child: Inline & Node) -> Bool

Parameters

  • child: The inline element to remove.

Returns

true if successful, otherwise false.

hash(into:)

public func hash(into hasher: inout Hasher)
Clone this wiki locally