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 24, 2020 · 11 revisions

ContainerOfInlineElements

public protocol ContainerOfInlineElements: Node

Inheritance

Node, Hashable, Equatable, CustomStringConvertible


Associated Types

Child

Typealias(context: Optional("ContainerOfInlineElements"), attributes: [], modifiers: [public], keyword: "typealias", name: "Child", initializedType: Optional("Inline & Node"), genericParameters: [], genericRequirements: [])

Required Properties

children

The block's children.

var children: [Child]

description

var description: String

Required Methods

hash(into:)

public func hash(into hasher: inout Hasher)

prepend(child:)

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

@discardableResult public func prepend(child: Child) -> 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: Child) -> 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: Child, before sibling: Child) -> 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: Child, after sibling: Child) -> 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: Child) -> Bool

Parameters

  • child: The inline element to remove.

Returns

true if successful, otherwise false.

==(lhs:rhs:)

public static func ==(lhs: Node, rhs: Node) -> Bool
Clone this wiki locally