Compare commits

...

No commits in common. "main" and "gh-pages" have entirely different histories.

233 changed files with 65023 additions and 23234 deletions

View File

@ -1,5 +0,0 @@
common --enable_bzlmod
build --macos_minimum_os=10.9
build --repo_env=CC=clang
test --test_output=errors

View File

@ -1 +0,0 @@
6.0.0

View File

@ -1,15 +0,0 @@
{
"homepage": "https://github.com/jpsim/Yams",
"maintainers": [
{
"email": "jp@jpsim.com",
"github": "jpsim",
"name": "JP Simard"
}
],
"repository": [
"github:jpsim/Yams"
],
"versions": [],
"yanked_versions": {}
}

View File

@ -1,24 +0,0 @@
shell_commands: &shell_commands
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
- "mkdir $SWIFT_HOME"
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
tasks:
verify_targets_linux:
name: Verify targets (Linux)
platform: ubuntu2004
environment:
CC: "clang"
SWIFT_VERSION: "5.7.2"
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
PATH: "$PATH:$SWIFT_HOME/usr/bin"
shell_commands: *shell_commands
build_flags:
- "--action_env=PATH"
build_targets:
- '@yams//:Yams'
verify_targets_macos:
name: Verify targets (macOS)
platform: macos
build_targets:
- '@yams//:Yams'

View File

@ -1,5 +0,0 @@
{
"url": "https://github.com/jpsim/Yams/archive/refs/tags/{TAG}.tar.gz",
"integrity": "",
"strip_prefix": "Yams-{TAG}"
}

View File

@ -1,2 +0,0 @@
paths:
- Sources/Yams

View File

@ -1,46 +0,0 @@
name: Bazel
on:
push:
branches: [main]
paths:
- '.github/workflows/bazel.yml'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
- '**/BUILD'
- 'WORKSPACE'
- '.bazelrc'
- '.bazelversion'
pull_request:
paths:
- '.github/workflows/bazel.yml'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
- '**/BUILD'
- 'WORKSPACE'
- '.bazelrc'
- '.bazelversion'
jobs:
MacOS:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Apple tests
run: bazelisk test //Tests/...
Linux:
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7', '5.8']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}-focal
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: Yams tests
run: bazel test --test_output=all //Tests/...

View File

@ -1,57 +0,0 @@
name: CMake
on:
push:
branches: [main]
paths:
- '.github/workflows/cmake.yml'
- '**/CMakeLists.txt'
- '**/*.cmake'
- '**/*.cmake.in'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
pull_request:
paths:
- '.github/workflows/cmake.yml'
- '**/CMakeLists.txt'
- '**/*.cmake'
- '**/*.cmake.in'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
jobs:
CMake:
strategy:
matrix:
xcode_version: ['14.2', '14.3']
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- run: brew install cmake ninja
- run: swift -version
- run: rm -rf build
- run: cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build
- run: cmake --build build --target install
- run: file /usr/local/lib/swift/macosx/libYams.dylib | grep "Mach-O 64-bit dynamically linked shared library x86_64"
CMake_Linux:
strategy:
matrix:
tag: ['5.6', '5.7', '5.8']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
steps:
- uses: actions/checkout@v3
- run: apt-get update && apt-get install -y ninja-build curl
- run: curl -L https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-x86_64.tar.gz | tar xz --strip-components=1 -C /usr
- run: swift -version
- run: rm -rf build
- run: cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build
- run: cmake --build build --target install

View File

@ -1,74 +0,0 @@
name: Jazzy
on:
push:
branches: [main]
paths:
- '.github/workflows/jazzy.yml'
- '.jazzy.yaml'
- '**/*.md'
- '**/*.jpg'
- 'Gemfile*'
- 'Package*'
- 'Sources/**/*.swift'
pull_request:
paths:
- '.github/workflows/jazzy.yml'
- '.jazzy.yaml'
- '**/*.md'
- '**/*.jpg'
- 'Gemfile*'
- 'Package*'
- 'Sources/**/*.swift'
jobs:
Jazzy:
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app
steps:
- uses: actions/checkout@v3
- name: Install SourceKitten
run: brew install sourcekitten
- run: swift build
- name: Generate documentation json
run: sourcekitten doc --spm --module-name Yams > yams.json
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.5
bundler-cache: true
- name: Run jazzy
run: bundle exec jazzy --clean --sourcekitten-sourcefile yams.json
- name: Validate documentation coverage
run: |
if ruby -rjson -e "j = JSON.parse(File.read('docs/undocumented.json')); exit j['warnings'].length != 0"; then
echo "Undocumented declarations:"
cat docs/undocumented.json
exit 1
fi
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: API Docs
path: docs
- name: Push to gh-pages
if: github.event_name == 'push'
run: |
git config --global user.email "${GITHUB_ACTOR}"
git config --global user.name "${GITHUB_ACTOR}@users.noreply.github.com"
git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" out
cd out
git checkout gh-pages
git rm -rf .
cd ..
cp -a docs/. out/.
cd out
git add -A
git commit -m "Automated deployment to GitHub Pages: ${GITHUB_SHA}" --allow-empty
git push origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,35 +0,0 @@
name: Nightly
on:
push:
branches: [main]
paths:
- '.github/workflows/nightly.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
pull_request:
paths:
- '.github/workflows/nightly.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
schedule:
- cron: '0 4 * * *'
jobs:
Nightly:
runs-on: ubuntu-latest
container:
image: swiftlang/swift:nightly
steps:
- uses: actions/checkout@v3
- run: swift --version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel

View File

@ -1,29 +0,0 @@
name: pod lib lint
on:
push:
branches: [main]
paths:
- '.github/workflows/pod_lib_lint.yml'
- '*.podspec'
- 'Gemfile*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
pull_request:
paths:
- '.github/workflows/pod_lib_lint.yml'
- '*.podspec'
- 'Gemfile*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
jobs:
pod_lib_lint:
name: pod lib lint
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app
steps:
- uses: actions/checkout@v3
- run: bundle install --path vendor/bundle
- run: bundle exec pod lib lint --verbose

View File

@ -1,18 +0,0 @@
name: SwiftLint
on:
pull_request:
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'
jobs:
SwiftLint:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:0.51.0
steps:
- uses: actions/checkout@v3
- name: SwiftLint
run: swiftlint lint --strict

View File

@ -1,35 +0,0 @@
name: SwiftLint Analyze
on:
push:
branches: [main]
paths:
- '.github/workflows/swiftlint_analyze.yml'
- 'Yams.xcodeproj/**'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Tests/**/*.swift'
- '!Tests/LinuxMain.swift'
pull_request:
paths:
- '.github/workflows/swiftlint_analyze.yml'
- 'Yams.xcodeproj/**'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Tests/**/*.swift'
- '!Tests/LinuxMain.swift'
jobs:
Analyze:
runs-on: macos-13
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app
steps:
- uses: actions/checkout@v3
- name: Generate xcodebuild.log
run: xcodebuild -sdk macosx -scheme Yams -project Yams.xcodeproj clean build-for-testing > xcodebuild.log
shell: bash
- name: Install SwiftLint
run: brew install swiftlint || brew upgrade swiftlint
- name: Run SwiftLint Analyze
run: swiftlint analyze --strict --compiler-log-path xcodebuild.log --reporter github-actions-logging

View File

@ -1,110 +0,0 @@
name: SwiftPM
on:
push:
branches: [main]
paths:
- '.codecov.yml'
- '.github/workflows/swiftpm.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
pull_request:
paths:
- '.codecov.yml'
- '.github/workflows/swiftpm.yml'
- 'Package*'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Sources/**/module.modulemap'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
jobs:
Xcode:
strategy:
matrix:
xcode_version: ['12.5.1', '13.0', '13.1', '13.2.1']
runs-on: macos-11
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
Xcode_Monterey:
strategy:
matrix:
xcode_version: ['13.3.1', '13.4', '14.0.1', '14.1', '14.2']
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v3
- run: swift -version
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
- name: Code Coverage
if: matrix.xcode_version == '14.2'
run: |
swift test --enable-code-coverage
xcrun llvm-cov export -format="lcov" .build/debug/YamsPackageTests.xctest/Contents/MacOS/YamsPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
if [[ -n "${CODECOV_TOKEN}" ]]; then
bash <(curl -s https://codecov.io/bash) -f coverage.lcov
fi
env: { 'CODECOV_TOKEN': '${{ secrets.CODECOV_TOKEN }}' }
Linux:
strategy:
matrix:
tag: ['5.4', '5.5', '5.6', '5.7']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
steps:
- uses: actions/checkout@v3
- run: YAMS_DEFAULT_ENCODING=UTF16 swift test --parallel
- run: YAMS_DEFAULT_ENCODING=UTF8 swift test --parallel
Windows:
runs-on: windows-latest
strategy:
matrix:
include:
- branch: swift-5.6.3-release
tag: 5.6.3-RELEASE
- branch: swift-5.7.2-release
tag: 5.7.2-RELEASE
- branch: development
tag: DEVELOPMENT-SNAPSHOT-2021-11-20-a
steps:
- uses: actions/checkout@v3
- uses: compnerd/gha-setup-swift@main
with:
branch: ${{ matrix.branch }}
tag: ${{ matrix.tag }}
# Commands to run once connected via SSH:
#
# >d:
# >cd a\Yams\Yams
# >setx SDKROOT C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk
# >setx DEVELOPER_DIR C:\Library\Developer
# >swift build -v
# >swift test -v
# >swift test -v --filter testBinary
# - name: Start SSH session
# uses: luchihoratiu/debug-via-ssh@main
# with:
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
# SSH_PASS: ${{ secrets.SSH_PASS }}
- name: Build
run: swift build -v
- name: Test
run: swift test -v

View File

@ -1,95 +0,0 @@
name: xcodebuild
on:
push:
branches: [main]
paths:
- '.github/workflows/xcodebuild.yml'
- 'Yams.xcodeproj/**'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
- '!Tests/LinuxMain.swift'
pull_request:
paths:
- '.github/workflows/xcodebuild.yml'
- 'Yams.xcodeproj/**'
- 'Sources/**/*.[ch]'
- 'Sources/**/*.swift'
- 'Tests/**/*.swift'
- 'Tests/**/*.ya?ml'
- '!Tests/LinuxMain.swift'
jobs:
xcodebuild:
strategy:
matrix:
xcode:
- version: '12.5.1'
- version: '13.0'
- version: '13.1'
- version: '13.2.1'
xcode_flags: ['-scheme Yams -project Yams.xcodeproj']
runs-on: macos-11
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode.version }}.app
steps:
- uses: actions/checkout@v3
- run: xcodebuild -version
- name: macOS with UTF16
if: always()
run: YAMS_DEFAULT_ENCODING=UTF16 xcodebuild ${{ matrix.xcode_flags }} test | xcpretty
shell: bash
- name: macOS with UTF8
if: always()
run: YAMS_DEFAULT_ENCODING=UTF8 xcodebuild ${{ matrix.xcode_flags }} test | xcpretty
shell: bash
- name: iPhone Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} test -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty
shell: bash
- name: Apple TV Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} test -sdk appletvsimulator -destination "name=Apple TV 4K" | xcpretty
shell: bash
- name: watchOS Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} build -sdk watchsimulator | xcpretty
shell: bash
xcodebuild_Monterey:
strategy:
matrix:
xcode:
- version: '13.3.1'
- version: '13.4'
- version: '14.0.1'
- version: '14.2'
xcode_flags: ['-scheme Yams -project Yams.xcodeproj']
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode.version }}.app
steps:
- uses: actions/checkout@v3
- run: xcodebuild -version
- name: macOS with UTF16
if: always()
run: YAMS_DEFAULT_ENCODING=UTF16 xcodebuild ${{ matrix.xcode_flags }} test | xcpretty
shell: bash
- name: macOS with UTF8
if: always()
run: YAMS_DEFAULT_ENCODING=UTF8 xcodebuild ${{ matrix.xcode_flags }} test | xcpretty
shell: bash
- name: iPhone Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} test -sdk iphonesimulator -destination "name=iPhone 8" | xcpretty
shell: bash
- name: Apple TV Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} test -sdk appletvsimulator -destination "name=Apple TV 4K (2nd generation)" | xcpretty
shell: bash
- name: watchOS Simulator
if: always()
run: xcodebuild ${{ matrix.xcode_flags }} build -sdk watchsimulator | xcpretty
shell: bash

74
.gitignore vendored
View File

@ -1,74 +0,0 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
# vim swap files
.*.sw[nop]
## Build generated
build/
DerivedData
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
## Other
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Packages/
.build/
.swiftpm/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
fastlane/report.xml
fastlane/screenshots
# Docs
docs
.swiftpm
# Bazel
bazel-*

View File

@ -1,9 +0,0 @@
module: Yams
author: JP Simard, Norio Nomura
author_url: https://jpsim.com
root_url: https://jpsim.com/Yams/
github_url: https://github.com/jpsim/Yams
github_file_prefix: https://github.com/jpsim/Yams/tree/main
theme: fullwidth
clean: true
copyright: '© 2018 [JP Simard](https://jpsim.com) under MIT.'

View File

@ -1,4 +0,0 @@
version: 1
builder:
configs:
- documentation_targets: [Yams]

View File

@ -1,18 +0,0 @@
included:
- Sources
- Tests
disabled_rules:
- blanket_disable_command
- todo
analyzer_rules:
- unused_import
- unused_declaration
line_length: 120
identifier_name:
excluded:
- cr
- ln
- no
nesting:
type_level: 2
large_tuple: 3

25
BUILD
View File

@ -1,25 +0,0 @@
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
cc_library(
name = "CYaml",
srcs = glob([
"Sources/CYaml/src/*.c",
"Sources/CYaml/src/*.h",
]),
hdrs = ["Sources/CYaml/include/yaml.h"],
# Requires because of https://github.com/bazelbuild/bazel/pull/10143 otherwise host transition builds fail
copts = ["-fPIC"],
includes = ["Sources/CYaml/include"],
linkstatic = True,
tags = ["swift_module"],
visibility = ["//Tests:__subpackages__"],
)
swift_library(
name = "Yams",
srcs = glob(["Sources/Yams/*.swift"]),
copts = ["-DSWIFT_PACKAGE"],
module_name = "Yams",
visibility = ["//visibility:public"],
deps = ["//:CYaml"],
)

View File

@ -1,461 +0,0 @@
## Main
##### Breaking
* None.
##### Enhancements
* None.
##### Bug Fixes
* Empty dictionaries can be now represented, regardless of its key or element
type information.
[JP Simard](https://github.com/jpsim)
[#393](https://github.com/jpsim/Yams/issues/393)
## 5.0.5
##### Breaking
* None.
##### Enhancements
* None.
##### Bug Fixes
* Fix using Yams from bazel without bzlmod.
[Keith Smiley](https://github.com/keith)
## 5.0.4
##### Breaking
* None.
##### Enhancements
* Statically link `CYaml` when building with SwiftPM.
[Saleem Abdulrasool](https://github.com/compnerd)
##### Bug Fixes
* None.
## 5.0.3
##### Breaking
* None.
##### Enhancements
* Added support for bzlmod.
[Keith Smiley](https://github.com/keith)
##### Bug Fixes
* None.
## 5.0.1
##### Breaking
* None.
##### Enhancements
* None.
##### Bug Fixes
* Build CYaml as PIC (Position Independent Code) when building with
CMake.
[Yuta Saito](https://github.com/kateinoigakukun)
## 5.0.0
##### Breaking
* Swift 5.4 or later is now required to build Yams.
[JP Simard](https://github.com/jpsim)
##### Enhancements
* Adding `sequenceStyle` and `mappingStyle` to `Emitter.Options`
[Terence Grant](https://github.com/tatewake)
##### Bug Fixes
* None.
## 4.0.6
##### Breaking
* None.
##### Enhancements
* Update Bazel config to allow targets to be directly consumed.
[Maxwell Elliott](https://github.com/maxwellE)
* Fix some Bazel integration issues
[Keith Smiley](https://github.com/keith)
##### Bug Fixes
* Fix build error when integrating Yams using CocoaPods.
[JP Simard](https://github.com/jpsim)
## 4.0.5
##### Breaking
* None.
##### Enhancements
* Adds the ability to build Yams for Linux and MacOS via Bazel.
[Maxwell Elliott](https://github.com/maxwellE)
* Updated libYAML. See changes here:
https://github.com/yaml/libyaml/compare/53f5b86...acd6f6f
[JP Simard](https://github.com/jpsim)
##### Bug Fixes
* None.
## 4.0.4
##### Breaking
* None.
##### Enhancements
* Expose the underlying `Node`'s `Mark` on `Decoder`.
[Brentley Jones](https://github.com/brentleyjones)
##### Bug Fixes
* Fix mark for sequences and mappings.
[Brentley Jones](https://github.com/brentleyjones)
## 4.0.3
##### Breaking
* None.
##### Enhancements
* Update Xcode project from Swift 4.2 to 5.0.
[Brennan Stehling](https://github.com/brennanMKE)
* Enable `CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER`.
[Brennan Stehling](https://github.com/brennanMKE)
##### Bug Fixes
* None.
## 4.0.2
##### Breaking
* None.
##### Enhancements
* Add support for Apple Silicon in `SwiftSupport.cmake`.
[Max Desiatov](https://github.com/MaxDesiatov)
##### Bug Fixes
* None.
## 4.0.1
##### Breaking
* None.
##### Enhancements
* None.
##### Bug Fixes
* String scalars containing numbers are no longer decoded as numbers.
[Matt Polzin](https://github.com/mattpolzin)
[#263](https://github.com/jpsim/Yams/issues/263)
* Fix compilation errors when compiling using Swift For TensorFlow or
Windows.
[Saleem Abdulrasool](https://github.com/compnerd)
## 4.0.0
##### Breaking
* Swift 5.1 or later is now required to build Yams.
[JP Simard](https://github.com/jpsim)
##### Enhancements
* `YAMLDecoder` now conforms to the `TopLevelDecoder` protocol when
Apple's Combine framework is available.
[JP Simard](https://github.com/jpsim)
[#261](https://github.com/jpsim/Yams/issues/261)
* Add `YAMLDecoder.decode(...)` overload tha takes a YAML string encoded
as `Data` using UTF8 or UTF16.
[JP Simard](https://github.com/jpsim)
##### Bug Fixes
* Fix CMake installation issues.
[Saleem Abdulrasool](https://github.com/compnerd)
## 3.0.1
##### Breaking
* None.
##### Enhancements
* None.
##### Bug Fixes
* Fix CMake support.
[JP Simard](https://github.com/jpsim)
## 3.0.0
##### Breaking
* Swift 4.1 or later is now required to build Yams.
[Norio Nomura](https://github.com/norio-nomura)
##### Enhancements
* Accurately represent `Date`s with nanosecond components in Swift 4.x.
[Norio Nomura](https://github.com/norio-nomura)
* Change to apply single quoted style to YAML representation of `String`, if
that contents will be resolved to other than `.str` by default `Resolver`.
[Norio Nomura](https://github.com/norio-nomura)
[#197](https://github.com/jpsim/Yams/issues/197)
* Support `UUID` scalars.
[Ondrej Rafaj](https://github.com/rafiki270)
* Get Yams building for Windows.
[Saleem Abdulrasool](https://github.com/compnerd)
* Add support for CMake based builds.
[Saleem Abdulrasool](https://github.com/compnerd)
* Merge anchors in `YAMLDecoder` by default.
[Brentley Jones](https://github.com/brentleyjones)
[#238](https://github.com/jpsim/Yams/issues/238)
##### Bug Fixes
* Fix `Yams.dump` when object contains a keyed null value.
[JP Simard](https://github.com/jpsim)
[#232](https://github.com/jpsim/Yams/issues/232)
* Fix a bug where `YAMLEncoder` would delay `Date`s by 1 second when encoding
values with a `nanosecond` component greater than 999499997.
[Norio Nomura](https://github.com/norio-nomura)
[#192](https://github.com/jpsim/Yams/issues/192)
* Fix dangling pointer warning with Swift 5.2.
[JP Simard](https://github.com/jpsim)
## 2.0.0
##### Breaking
* Change `byteOffset` to `offset` in `YamlError.reader`.
[Norio Nomura](https://github.com/norio-nomura)
##### Enhancements
* Add `encoding` option to `Parser` as `Parser.Encoding` type to specify
which encoding to pass to libYAML. Along with that change, add `encoding`
options to `load()`, `load_all()`, `compose()`, `compose_all()` and
`YAMLDecoder`. The default encoding will be determined at run time based on
the String type's native encoding.
[Norio Nomura](https://github.com/norio-nomura)
##### Bug Fixes
* None.
## 1.0.2
##### Breaking
* None.
##### Enhancements
* Update LibYAML sources to latest versions as of January 6 2018.
[JP Simard](https://github.com/jpsim)
##### Bug Fixes
* Fix some test failures with the latest Swift 5 snapshot on Apple platforms.
[Norio Nomura](https://github.com/norio-nomura)
[#143](https://github.com/jpsim/Yams/issues/143)
* Preserve nanoseconds in dates when using swift-corelibs-foundation with
Swift 5.
[Norio Nomura](https://github.com/norio-nomura)
[#146](https://github.com/jpsim/Yams/pull/146)
* Fix null/~/NULL/Null were parsed as strings, not nil by `YAMLDecoder`.
[Norio Nomura](https://github.com/norio-nomura)
[#157](https://github.com/jpsim/Yams/issues/157)
## 1.0.1
##### Breaking
* None.
##### Enhancements
* Improve support for compiling with Swift 4.2 or later.
[Norio Nomura](https://github.com/norio-nomura)
##### Bug Fixes
* Fix issues with unset `DYLIB_COMPATIBILITY_VERSION` and
`DYLIB_CURRENT_VERSION`. Now both values are set to `1`.
[Norio Nomura](https://github.com/norio-nomura)
[#131](https://github.com/jpsim/Yams/issues/131)
## 1.0.0
##### Breaking
* Rename `ScalarRepresentableCustomizedForCodable` to `YAMLEncodable`.
[Norio Nomura](https://github.com/norio-nomura)
##### Enhancements
* API documentation now available at [jpsim.com/Yams](https://jpsim.com/Yams).
[JP Simard](https://github.com/jpsim)
##### Bug Fixes
* None.
## 0.7.0
##### Breaking
* Drop support for building with `-swift-version 3`.
[Norio Nomura](https://github.com/norio-nomura)
##### Enhancements
* None.
##### Bug Fixes
* Always parse quoted values as strings.
[Norio Nomura](https://github.com/norio-nomura)
[#116](https://github.com/jpsim/Yams/issues/116)
## 0.6.0
##### Breaking
* Some APIs have changed related to `ScalarConstructible`.
* Change parameter type of `ScalarConstructible.construct(from:)` from `Node`
to `Node.Scalar`
* Change `Constructor`:
* Split `Map` into `ScalarMap`, `MappingMap` and `SequenceMap`
* Split `defaultMap` into `defaultScalarMap`, `defaultMappingMap` and
`defaultSequenceMap`
* Change `init(_:)` to `init(_:_:_:)`
[Norio Nomura](https://github.com/norio-nomura)
[#105](https://github.com/jpsim/Yams/issues/105)
##### Enhancements
* Improve test of "tag:yaml.org,2002:value".
[Norio Nomura](https://github.com/norio-nomura)
[#97](https://github.com/jpsim/Yams/issues/97)
##### Bug Fixes
* `subscript(string:)` fails to lookup value if `Node` has non default `Resolver`.
[Norio Nomura](https://github.com/norio-nomura)
[#100](https://github.com/jpsim/Yams/issues/100)
* Removed asserts in Constructor that were stopping the YAMLDecoder from returning correct errors.
[David Hart](https://github.com/hartbit)
[#94](https://github.com/jpsim/Yams/pull/94)
## 0.5.0
##### Breaking
* Swift 3.2 or later is now required to build Yams.
[Norio Nomura](https://github.com/norio-nomura)
[JP Simard](https://github.com/jpsim)
##### Enhancements
* None.
##### Bug Fixes
* None.
## 0.4.1
## 0.4.0
## 0.3.7
## 0.3.6
## 0.3.5
## 0.3.4
## 0.3.3
## 0.3.2
## 0.3.1
## 0.3.0
## 0.2.0
## 0.1.5
## 0.1.4
## 0.1.3
## 0.1.2
## 0.1.1
## 0.1.0

View File

@ -1,36 +0,0 @@
cmake_minimum_required(VERSION 3.15.1)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
project(Yams
LANGUAGES C Swift)
option(BUILD_SHARED_LIBS "build shared libraries" ON)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
option(BUILD_TESTING "build tests by default" NO)
else()
option(BUILD_TESTING "build tests by default" YES)
endif()
find_package(dispatch CONFIG QUIET)
find_package(Foundation CONFIG QUIET)
if(CMAKE_VERSION VERSION_LESS 3.16 AND CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
else()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swift)
include(SwiftSupport)
include(CTest)
add_subdirectory(Sources)
if(BUILD_TESTING)
add_subdirectory(Tests)
endif()
add_subdirectory(cmake/modules)

View File

@ -1,23 +0,0 @@
## Tracking Changes
All changes should be made via pull requests on GitHub.
When issuing a pull request, please add a summary of your changes to the
`CHANGELOG.md` file.
We follow the same syntax as [CocoaPods' `CHANGELOG.md`](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md):
1. One Markdown unnumbered list item describing the change.
2. 2 trailing spaces on the last line describing the change.
3. A list of Markdown hyperlinks to the change's contributors. One entry
per line. Usually just one.
4. A list of Markdown hyperlinks to the issues the change addresses. One entry
per line. Usually just one.
5. All `CHANGELOG.md` content is hard-wrapped at 80 characters.
## Updating CI Jobs
CI jobs for the latest official Swift and Xcode releases should be kept
up to date based on the available Xcode versions that can be found
in the [actions/virtual-environments](https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode)
repo.

519
Classes.html Normal file
View File

@ -0,0 +1,519 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Classes Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
<a title="Classes Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">Yams Reference</a>
<img class="carat" src="img/carat.png" alt=""/>
Classes Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Classes</h1>
<p>The following classes are available globally.</p>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC"></a>
<a name="//apple_ref/swift/Class/Constructor" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC">Constructor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Constructors are used to translate <code><a href="Enums/Node.html">Node</a></code>s to Swift values.</p>
<a href="Classes/Constructor.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Constructor</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L12-L63">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLDecoderC"></a>
<a name="//apple_ref/swift/Class/YAMLDecoder" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLDecoderC">YAMLDecoder</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>Codable</code>-style <code>Decoder</code> that can be used to decode a <code>Decodable</code> type from a given <code>String</code> and optional
user info mapping. Similar to <code>Foundation.JSONDecoder</code>.</p>
<a href="Classes/YAMLDecoder.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">YAMLDecoder</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">YAMLDecoder</span><span class="p">:</span> <span class="kt">TopLevelDecoder</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L13-L68">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC"></a>
<a name="//apple_ref/swift/Class/Emitter" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC">Emitter</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Class responsible for emitting libYAML events.</p>
<a href="Classes/Emitter.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Emitter</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L215-L401">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLEncoderC"></a>
<a name="//apple_ref/swift/Class/YAMLEncoder" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLEncoderC">YAMLEncoder</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>Codable</code>-style <code>Encoder</code> that can be used to encode an <code>Encodable</code> type to a YAML string using optional
user info mapping. Similar to <code>Foundation.JSONEncoder</code>.</p>
<a href="Classes/YAMLEncoder.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">YAMLEncoder</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Encoder.swift#L11-L46">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC"></a>
<a name="//apple_ref/swift/Class/Parser" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC">Parser</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Parses YAML strings.</p>
<a href="Classes/Parser.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Parser</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L113-L266">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC"></a>
<a name="//apple_ref/swift/Class/Resolver" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC">Resolver</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Class used to resolve nodes to tags based on customizable rules.</p>
<a href="Classes/Resolver.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L12-L91">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC"></a>
<a name="//apple_ref/swift/Class/Tag" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC">Tag</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Tags describe the the <em>type</em> of a Node.</p>
<a href="Classes/Tag.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Tag</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Tag</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Tag</span><span class="p">:</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L10-L67">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

660
Classes/Constructor.html Normal file
View File

@ -0,0 +1,660 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Constructor Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/Constructor" class="dashAnchor"></a>
<a title="Constructor Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Constructor Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Constructor</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Constructor</span></code></pre>
</div>
</div>
<p>Constructors are used to translate <code><a href="../Enums/Node.html">Node</a></code>s to Swift values.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L12-L63">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC9ScalarMapa"></a>
<a name="//apple_ref/swift/Alias/ScalarMap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC9ScalarMapa">ScalarMap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Maps <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code>s to <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code>s.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">ScalarMap</span> <span class="o">=</span> <span class="p">[</span><span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span> <span class="p">:</span> <span class="p">(</span><span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Any</span><span class="p">?]</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L14">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC10MappingMapa"></a>
<a name="//apple_ref/swift/Alias/MappingMap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC10MappingMapa">MappingMap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Maps <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code>s to <code><a href="../Enums/Node/Mapping.html">Node.Mapping</a></code>s.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">MappingMap</span> <span class="o">=</span> <span class="p">[</span><span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span> <span class="p">:</span> <span class="p">(</span><span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Any</span><span class="p">?]</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L16">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC11SequenceMapa"></a>
<a name="//apple_ref/swift/Alias/SequenceMap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC11SequenceMapa">SequenceMap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Maps <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code>s to <code><a href="../Enums/Node/Sequence.html">Node.Sequence</a></code>s.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">SequenceMap</span> <span class="o">=</span> <span class="p">[</span><span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span> <span class="p">:</span> <span class="p">(</span><span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Any</span><span class="p">?]</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorCyACSDyAA3TagC4NameVypSgAA4NodeO6ScalarVcG_SDyAghJ7MappingVcGSDyAghJ8SequenceVcGtcfc"></a>
<a name="//apple_ref/swift/Method/init(_:_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorCyACSDyAA3TagC4NameVypSgAA4NodeO6ScalarVcG_SDyAghJ7MappingVcGSDyAghJ8SequenceVcGtcfc">init(_:<wbr>_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Initialize a <code>Constructor</code> with the specified maps, falling back to default maps.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">scalarMap</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC9ScalarMapa">ScalarMap</a></span> <span class="o">=</span> <span class="n"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC16defaultScalarMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ">defaultScalarMap</a></span><span class="p">,</span>
<span class="n">_</span> <span class="nv">mappingMap</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC10MappingMapa">MappingMap</a></span> <span class="o">=</span> <span class="n"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC17defaultMappingMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ">defaultMappingMap</a></span><span class="p">,</span>
<span class="n">_</span> <span class="nv">sequenceMap</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC11SequenceMapa">SequenceMap</a></span> <span class="o">=</span> <span class="n"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC18defaultSequenceMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ">defaultSequenceMap</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalarMap</em>
</code>
</td>
<td>
<div>
<p>Maps <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code>s to <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code>s.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mappingMap</em>
</code>
</td>
<td>
<div>
<p>Maps <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code>s to <code><a href="../Enums/Node/Mapping.html">Node.Mapping</a></code>s.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>sequenceMap</em>
</code>
</td>
<td>
<div>
<p>Maps <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code>s to <code><a href="../Enums/Node/Sequence.html">Node.Sequence</a></code>s.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L25-L31">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC3any4fromypAA4NodeO_tF"></a>
<a name="//apple_ref/swift/Method/any(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC3any4fromypAA4NodeO_tF">any(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Constructs Swift values based on the maps this <code>Constructor</code> was initialized with.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">any</span><span class="p">(</span><span class="n">from</span> <span class="nv">node</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Any</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>node</em>
</code>
</td>
<td>
<div>
<p><code><a href="../Enums/Node.html">Node</a></code> from which to extract an <code>Any</code> Swift value, if one was produced by the Node
type&rsquo;s relevant mapping on this <code>Constructor</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An <code>Any</code> Swift value, if one was produced by the Node type&rsquo;s relevant mapping on this
<code>Constructor</code>.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L40-L58">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Default%20Mappings"></a>
<a name="//apple_ref/swift/Section/Default Mappings" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Default%20Mappings"></a>
<h3 class="section-name"><span>Default Mappings</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC7defaultACvpZ"></a>
<a name="//apple_ref/swift/Variable/default" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC7defaultACvpZ">default</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default <code>Constructor</code> to be used with APIs where none is explicitly provided.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">let</span> <span class="p">`</span><span class="nv">default</span><span class="p">`:</span> <span class="kt">Constructor</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L69">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC16defaultScalarMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultScalarMap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC16defaultScalarMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ">defaultScalarMap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code> to <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> map.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">defaultScalarMap</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC9ScalarMapa">ScalarMap</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L72">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC17defaultMappingMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultMappingMap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC17defaultMappingMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ">defaultMappingMap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code> to <code><a href="../Enums/Node/Mapping.html">Node.Mapping</a></code> map.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">defaultMappingMap</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC10MappingMapa">MappingMap</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L86">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11ConstructorC18defaultSequenceMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ"></a>
<a name="//apple_ref/swift/Variable/defaultSequenceMap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11ConstructorC18defaultSequenceMapSDyAA3TagC4NameVypSgAA4NodeO0D0VcGvpZ">defaultSequenceMap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default <code><a href="../Classes/Tag/Name.html">Tag.Name</a></code> to <code><a href="../Enums/Node/Sequence.html">Node.Sequence</a></code> map.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">defaultSequenceMap</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html#/s:4Yams11ConstructorC11SequenceMapa">SequenceMap</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L95">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

733
Classes/Emitter.html Normal file
View File

@ -0,0 +1,733 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Emitter Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/Emitter" class="dashAnchor"></a>
<a title="Emitter Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Emitter Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Emitter</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Emitter</span></code></pre>
</div>
</div>
<p>Class responsible for emitting libYAML events.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L215-L401">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC9LineBreakO"></a>
<a name="//apple_ref/swift/Enum/LineBreak" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC9LineBreakO">LineBreak</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Line break options to use when emitting YAML.</p>
<a href="../Classes/Emitter/LineBreak.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">LineBreak</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L217-L224">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC4data10Foundation4DataVvp"></a>
<a name="//apple_ref/swift/Property/data" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC4data10Foundation4DataVvp">data</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Retrieve this Emitter&rsquo;s binary output.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L227">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV"></a>
<a name="//apple_ref/swift/Struct/Options" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV">Options</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Configuration options to use when emitting YAML.</p>
<a href="../Classes/Emitter/Options.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L230-L257">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7optionsAC7OptionsVvp"></a>
<a name="//apple_ref/swift/Property/options" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7optionsAC7OptionsVvp">options</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Configuration options to use when emitting YAML.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/Emitter/Options.html">Options</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L260-L264">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC9canonical6indent5width12allowUnicode9lineBreak13explicitStart0J3End7version8sortKeys13sequenceStyle07mappingQ0ACSb_S2iSbAC04LineI0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0Q0OAU7MappingVAXOtcfc"></a>
<a name="//apple_ref/swift/Method/init(canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC9canonical6indent5width12allowUnicode9lineBreak13explicitStart0J3End7version8sortKeys13sequenceStyle07mappingQ0ACSb_S2iSbAC04LineI0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0Q0OAU7MappingVAXOtcfc">init(canonical:<wbr>indent:<wbr>width:<wbr>allowUnicode:<wbr>lineBreak:<wbr>explicitStart:<wbr>explicitEnd:<wbr>version:<wbr>sortKeys:<wbr>sequenceStyle:<wbr>mappingStyle:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create an <code>Emitter</code> with the specified options.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">canonical</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
<span class="nv">indent</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">width</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">allowUnicode</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
<span class="nv">lineBreak</span><span class="p">:</span> <span class="kt"><a href="../Classes/Emitter/LineBreak.html">LineBreak</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">ln</span><span class="p">,</span>
<span class="nv">explicitStart</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
<span class="nv">explicitEnd</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
<span class="nv">version</span><span class="p">:</span> <span class="p">(</span><span class="nv">major</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">minor</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
<span class="nv">sortKeys</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
<span class="nv">sequenceStyle</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="o">.</span><span class="kt">Style</span> <span class="o">=</span> <span class="o">.</span><span class="n">any</span><span class="p">,</span>
<span class="nv">mappingStyle</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="o">.</span><span class="kt">Style</span> <span class="o">=</span> <span class="o">.</span><span class="n">any</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>canonical</em>
</code>
</td>
<td>
<div>
<p>Set if the output should be in the &ldquo;canonical&rdquo; format described in the YAML
specification.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>indent</em>
</code>
</td>
<td>
<div>
<p>Set the indentation value.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>width</em>
</code>
</td>
<td>
<div>
<p>Set the preferred line width. -1 means unlimited.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>allowUnicode</em>
</code>
</td>
<td>
<div>
<p>Set if unescaped non-ASCII characters are allowed.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>lineBreak</em>
</code>
</td>
<td>
<div>
<p>Set the preferred line break.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>explicitStart</em>
</code>
</td>
<td>
<div>
<p>Explicit document start <code>---</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>explicitEnd</em>
</code>
</td>
<td>
<div>
<p>Explicit document end <code><a href="../Classes/Emitter/LineBreak.html">...</a></code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>version</em>
</code>
</td>
<td>
<div>
<p>The <code>%YAML</code> directive value or nil.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>sortKeys</em>
</code>
</td>
<td>
<div>
<p>Set if emitter should sort keys in lexicographic order.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>sequenceStyle</em>
</code>
</td>
<td>
<div>
<p>Set the style for sequences (arrays / lists)</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mappingStyle</em>
</code>
</td>
<td>
<div>
<p>Set the style for mappings (dictionaries)</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L280-L314">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC4openyyKF"></a>
<a name="//apple_ref/swift/Method/open()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC4openyyKF">open()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Open &amp; initialize the emitter.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<code><a href="../Enums/YamlError.html">YamlError</a></code> if the <code>Emitter</code> was already opened or closed.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">open</span><span class="p">()</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L323-L335">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC5closeyyKF"></a>
<a name="//apple_ref/swift/Method/close()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC5closeyyKF">close()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Close the <code>Emitter.</code></p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<code><a href="../Enums/YamlError.html">YamlError</a></code> if the <code>Emitter</code> hasn&rsquo;t yet been initialized.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">close</span><span class="p">()</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L340-L352">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC9serialize4nodeyAA4NodeO_tKF"></a>
<a name="//apple_ref/swift/Method/serialize(node:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC9serialize4nodeyAA4NodeO_tKF">serialize(node:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Ingest a <code><a href="../Enums/Node.html">Node</a></code> to include when emitting the YAML output.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code><a href="../Enums/YamlError.html">YamlError</a></code> if the <code>Emitter</code> hasn&rsquo;t yet been opened or has been closed.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">serialize</span><span class="p">(</span><span class="nv">node</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>node</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node.html">Node</a></code> to serialize.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L359-L382">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,397 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>LineBreak Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/LineBreak" class="dashAnchor"></a>
<a title="LineBreak Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
LineBreak Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>LineBreak</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">LineBreak</span></code></pre>
</div>
</div>
<p>Line break options to use when emitting YAML.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L217-L224">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC9LineBreakO2cryA2EmF"></a>
<a name="//apple_ref/swift/Element/cr" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC9LineBreakO2cryA2EmF">cr</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use CR for line breaks (Mac style).</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">cr</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L219">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC9LineBreakO2lnyA2EmF"></a>
<a name="//apple_ref/swift/Element/ln" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC9LineBreakO2lnyA2EmF">ln</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use LN for line breaks (Unix style).</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">ln</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L221">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC9LineBreakO4crlnyA2EmF"></a>
<a name="//apple_ref/swift/Element/crln" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC9LineBreakO4crlnyA2EmF">crln</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use CR LN for line breaks (DOS style).</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">crln</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L223">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,763 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Options Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Options" class="dashAnchor"></a>
<a title="Options Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Options Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Options</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span></code></pre>
</div>
</div>
<p>Configuration options to use when emitting YAML.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L230-L257">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV9canonicalSbvp"></a>
<a name="//apple_ref/swift/Property/canonical" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV9canonicalSbvp">canonical</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set if the output should be in the &ldquo;canonical&rdquo; format described in the YAML specification.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">canonical</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L232">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV6indentSivp"></a>
<a name="//apple_ref/swift/Property/indent" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV6indentSivp">indent</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set the indentation value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">indent</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L234">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV5widthSivp"></a>
<a name="//apple_ref/swift/Property/width" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV5widthSivp">width</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set the preferred line width. -1 means unlimited.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">width</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L236">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV12allowUnicodeSbvp"></a>
<a name="//apple_ref/swift/Property/allowUnicode" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV12allowUnicodeSbvp">allowUnicode</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set if unescaped non-ASCII characters are allowed.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">allowUnicode</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L238">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV9lineBreakAC04LineE0Ovp"></a>
<a name="//apple_ref/swift/Property/lineBreak" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV9lineBreakAC04LineE0Ovp">lineBreak</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set the preferred line break.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">lineBreak</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Emitter/LineBreak.html">LineBreak</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L240">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV7versionSi5major_Si5minortSgvp"></a>
<a name="//apple_ref/swift/Property/version" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV7versionSi5major_Si5minortSgvp">version</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The <code>%YAML</code> directive value or nil.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">version</span><span class="p">:</span> <span class="p">(</span><span class="nv">major</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">minor</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L247">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV8sortKeysSbvp"></a>
<a name="//apple_ref/swift/Property/sortKeys" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV8sortKeysSbvp">sortKeys</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set if emitter should sort keys in lexicographic order.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">sortKeys</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L250">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV13sequenceStyleAA4NodeO8SequenceV0E0Ovp"></a>
<a name="//apple_ref/swift/Property/sequenceStyle" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV13sequenceStyleAA4NodeO8SequenceV0E0Ovp">sequenceStyle</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set the style for sequences (arrays / lists)</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">sequenceStyle</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="o">.</span><span class="kt">Style</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L253">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV12mappingStyleAA4NodeO7MappingV0E0Ovp"></a>
<a name="//apple_ref/swift/Property/mappingStyle" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV12mappingStyleAA4NodeO7MappingV0E0Ovp">mappingStyle</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set the style for mappings (dictionaries)</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">mappingStyle</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="o">.</span><span class="kt">Style</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L256">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Options%20Initializer"></a>
<a name="//apple_ref/swift/Section/Options Initializer" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Options%20Initializer"></a>
<h3 class="section-name"><span>Options Initializer</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams7EmitterC7OptionsV9canonical6indent5width12allowUnicode9lineBreak7version8sortKeys13sequenceStyle07mappingO0AESb_S2iSbAC04LineJ0OSi5major_Si5minortSgSbAA4NodeO8SequenceV0O0OAU7MappingVAXOtcfc"></a>
<a name="//apple_ref/swift/Method/init(canonical:indent:width:allowUnicode:lineBreak:version:sortKeys:sequenceStyle:mappingStyle:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams7EmitterC7OptionsV9canonical6indent5width12allowUnicode9lineBreak7version8sortKeys13sequenceStyle07mappingO0AESb_S2iSbAC04LineJ0OSi5major_Si5minortSgSbAA4NodeO8SequenceV0O0OAU7MappingVAXOtcfc">init(canonical:<wbr>indent:<wbr>width:<wbr>allowUnicode:<wbr>lineBreak:<wbr>version:<wbr>sortKeys:<wbr>sequenceStyle:<wbr>mappingStyle:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create <code>Emitter.Options</code> with the specified values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">canonical</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span> <span class="nv">indent</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">allowUnicode</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span>
<span class="nv">lineBreak</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Emitter.html">Emitter</a></span><span class="o">.</span><span class="kt"><a href="../../Classes/Emitter/LineBreak.html">LineBreak</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">ln</span><span class="p">,</span> <span class="nv">version</span><span class="p">:</span> <span class="p">(</span><span class="nv">major</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">minor</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
<span class="nv">sortKeys</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">,</span> <span class="nv">sequenceStyle</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="o">.</span><span class="kt">Style</span> <span class="o">=</span> <span class="o">.</span><span class="n">any</span><span class="p">,</span>
<span class="nv">mappingStyle</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="o">.</span><span class="kt">Style</span> <span class="o">=</span> <span class="o">.</span><span class="n">any</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>canonical</em>
</code>
</td>
<td>
<div>
<p>Set if the output should be in the &ldquo;canonical&rdquo; format described in the YAML
specification.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>indent</em>
</code>
</td>
<td>
<div>
<p>Set the indentation value.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>width</em>
</code>
</td>
<td>
<div>
<p>Set the preferred line width. -1 means unlimited.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>allowUnicode</em>
</code>
</td>
<td>
<div>
<p>Set if unescaped non-ASCII characters are allowed.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>lineBreak</em>
</code>
</td>
<td>
<div>
<p>Set the preferred line break.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>explicitStart</em>
</code>
</td>
<td>
<div>
<p>Explicit document start <code>---</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>explicitEnd</em>
</code>
</td>
<td>
<div>
<p>Explicit document end <code><a href="../../Classes/Emitter/Options.html#/s:4Yams7EmitterC7OptionsV9canonicalSbvp">...</a></code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>version</em>
</code>
</td>
<td>
<div>
<p>The <code>%YAML</code> directive value or nil.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>sortKeys</em>
</code>
</td>
<td>
<div>
<p>Set if emitter should sort keys in lexicographic order.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>sequenceStyle</em>
</code>
</td>
<td>
<div>
<p>Set the style for sequences (arrays / lists)</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mappingStyle</em>
</code>
</td>
<td>
<div>
<p>Set the style for mappings (dictionaries)</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Emitter.swift#L420-L433">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

722
Classes/Parser.html Normal file
View File

@ -0,0 +1,722 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Parser Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/Parser" class="dashAnchor"></a>
<a title="Parser Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Parser Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Parser</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Parser</span></code></pre>
</div>
</div>
<p>Parses YAML strings.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L113-L266">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC4yamlSSvp"></a>
<a name="//apple_ref/swift/Property/yaml" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC4yamlSSvp">yaml</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>YAML string.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L115">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8resolverAA8ResolverCvp"></a>
<a name="//apple_ref/swift/Property/resolver" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8resolverAA8ResolverCvp">resolver</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Resolver.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">resolver</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver.html">Resolver</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L117">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC11constructorAA11ConstructorCvp"></a>
<a name="//apple_ref/swift/Property/constructor" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC11constructorAA11ConstructorCvp">constructor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Constructor.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">constructor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html">Constructor</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L119">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8EncodingO"></a>
<a name="//apple_ref/swift/Enum/Encoding" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8EncodingO">Encoding</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Encoding</p>
<a href="../Classes/Parser/Encoding.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Encoding</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L122-L151">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8encodingAC8EncodingOvp"></a>
<a name="//apple_ref/swift/Property/encoding" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8encodingAC8EncodingOvp">encoding</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Encoding</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">encoding</span><span class="p">:</span> <span class="kt"><a href="../Classes/Parser/Encoding.html">Encoding</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L153">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC4yaml8resolver11constructor8encodingACSS_AA8ResolverCAA11ConstructorCAC8EncodingOtKcfc"></a>
<a name="//apple_ref/swift/Method/init(yaml:resolver:constructor:encoding:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC4yaml8resolver11constructor8encodingACSS_AA8ResolverCAA11ConstructorCAC8EncodingOtKcfc">init(yaml:<wbr>resolver:<wbr>constructor:<wbr>encoding:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set up a <code>Parser</code> with a <code>String</code> value as input.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code><a href="../Enums/YamlError.html">YamlError</a></code>.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n"><a href="../Classes/Parser.html#/s:4Yams6ParserC4yamlSSvp">yaml</a></span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
<span class="nv">resolver</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver.html">Resolver</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">,</span>
<span class="nv">constructor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html">Constructor</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">,</span>
<span class="nv">encoding</span><span class="p">:</span> <span class="kt"><a href="../Classes/Parser/Encoding.html">Encoding</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>string</em>
</code>
</td>
<td>
<div>
<p>YAML string.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>resolver</em>
</code>
</td>
<td>
<div>
<p>Resolver, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>constructor</em>
</code>
</td>
<td>
<div>
<p>Constructor, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>encoding</em>
</code>
</td>
<td>
<div>
<p>Encoding, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L163-L195">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC4yaml8resolver11constructor8encodingAC10Foundation4DataV_AA8ResolverCAA11ConstructorCAC8EncodingOtKcfc"></a>
<a name="//apple_ref/swift/Method/init(yaml:resolver:constructor:encoding:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC4yaml8resolver11constructor8encodingAC10Foundation4DataV_AA8ResolverCAA11ConstructorCAC8EncodingOtKcfc">init(yaml:<wbr>resolver:<wbr>constructor:<wbr>encoding:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set up a <code>Parser</code> with a <code>Data</code> value as input.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code><a href="../Enums/YamlError.html">YamlError</a></code>.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="n"><a href="../Classes/Parser.html#/s:4Yams6ParserC4yamlSSvp">yaml</a></span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
<span class="nv">resolver</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver.html">Resolver</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">,</span>
<span class="nv">constructor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html">Constructor</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">,</span>
<span class="nv">encoding</span><span class="p">:</span> <span class="kt"><a href="../Classes/Parser/Encoding.html">Encoding</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>string</em>
</code>
</td>
<td>
<div>
<p>YAML Data encoded using the <code><a href="../Classes/Parser.html#/s:4Yams6ParserC8encodingAC8EncodingOvp">encoding</a></code> encoding.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>resolver</em>
</code>
</td>
<td>
<div>
<p>Resolver, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>constructor</em>
</code>
</td>
<td>
<div>
<p>Constructor, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>encoding</em>
</code>
</td>
<td>
<div>
<p>Encoding, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L205-L219">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8nextRootAA4NodeOSgyKF"></a>
<a name="//apple_ref/swift/Method/nextRoot()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8nextRootAA4NodeOSgyKF">nextRoot()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Parse next document and return root Node.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code><a href="../Enums/YamlError.html">YamlError</a></code>.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">nextRoot</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Return Value</h4>
<p>next Node.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L230-L233">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC10singleRootAA4NodeOSgyKF"></a>
<a name="//apple_ref/swift/Method/singleRoot()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC10singleRootAA4NodeOSgyKF">singleRoot()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Parses the document expecting a single root Node and returns it.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code><a href="../Enums/YamlError.html">YamlError</a></code>.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">singleRoot</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Return Value</h4>
<p>Single root Node.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L240-L253">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,399 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Encoding Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Encoding" class="dashAnchor"></a>
<a title="Encoding Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Encoding Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Encoding</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Encoding</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<p>Encoding</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L122-L151">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8EncodingO4utf8yA2EmF"></a>
<a name="//apple_ref/swift/Element/utf8" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8EncodingO4utf8yA2EmF">utf8</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use <code>YAML_UTF8_ENCODING</code></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">utf8</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L124">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8EncodingO5utf16yA2EmF"></a>
<a name="//apple_ref/swift/Element/utf16" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8EncodingO5utf16yA2EmF">utf16</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Use <code>YAML_UTF16(BE|LE)_ENCODING</code></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">utf16</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L126">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams6ParserC8EncodingO7defaultAEvpZ"></a>
<a name="//apple_ref/swift/Variable/default" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams6ParserC8EncodingO7defaultAEvpZ">default</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default encoding, determined at run time based on the String type&rsquo;s native encoding.
This can be overridden by setting <code>YAMS_DEFAULT_ENCODING</code> to either <code>UTF8</code> or <code>UTF16</code>.
This value is case insensitive.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">var</span> <span class="p">`</span><span class="nv">default</span><span class="p">`:</span> <span class="kt">Encoding</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Parser.swift#L130">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

644
Classes/Resolver.html Normal file
View File

@ -0,0 +1,644 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Resolver Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/Resolver" class="dashAnchor"></a>
<a title="Resolver Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Resolver Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Resolver</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<p>Class used to resolve nodes to tags based on customizable rules.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L12-L91">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV"></a>
<a name="//apple_ref/swift/Struct/Rule" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV">Rule</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Rule describing how to resolve tags from regex patterns.</p>
<a href="../Classes/Resolver/Rule.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L14-L31">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC5rulesSayAC4RuleVGvp"></a>
<a name="//apple_ref/swift/Property/rules" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC5rulesSayAC4RuleVGvp">rules</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The rules used by this resolver to resolve nodes to tags.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">rules</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/Resolver/Rule.html">Rule</a></span><span class="p">]</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L34">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC10resolveTag2ofAA0D0C4NameVAA4NodeO_tF"></a>
<a name="//apple_ref/swift/Method/resolveTag(of:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC10resolveTag2ofAA0D0C4NameVAA4NodeO_tF">resolveTag(of:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Resolve a tag name from a given node.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">resolveTag</span><span class="p">(</span><span class="n">of</span> <span class="nv">node</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>node</em>
</code>
</td>
<td>
<div>
<p>Node whose tag should be resolved.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The resolved tag name.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L43-L52">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC9appendingyA2C4RuleVF"></a>
<a name="//apple_ref/swift/Method/appending(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC9appendingyA2C4RuleVF">appending(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns a Resolver constructed by appending rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">appending</span><span class="p">(</span><span class="n">_</span> <span class="nv">rule</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver/Rule.html">Rule</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L55-L57">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC9appendingyAcA3TagC4NameV_SStKF"></a>
<a name="//apple_ref/swift/Method/appending(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC9appendingyAcA3TagC4NameV_SStKF">appending(_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns a Resolver constructed by appending pattern for tag.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">appending</span><span class="p">(</span><span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">,</span> <span class="n">_</span> <span class="nv">pattern</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L60-L62">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC9replacingyA2C4RuleVF"></a>
<a name="//apple_ref/swift/Method/replacing(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC9replacingyA2C4RuleVF">replacing(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns a Resolver constructed by replacing rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">replacing</span><span class="p">(</span><span class="n">_</span> <span class="nv">rule</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver/Rule.html">Rule</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L65-L67">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC9replacing_4withAcA3TagC4NameV_SStKF"></a>
<a name="//apple_ref/swift/Method/replacing(_:with:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC9replacing_4withAcA3TagC4NameV_SStKF">replacing(_:<wbr>with:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns a Resolver constructed by replacing pattern for tag.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">replacing</span><span class="p">(</span><span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">,</span> <span class="n">with</span> <span class="nv">pattern</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L70-L72">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC8removingyAcA3TagC4NameVF"></a>
<a name="//apple_ref/swift/Method/removing(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC8removingyAcA3TagC4NameVF">removing(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns a Resolver constructed by removing pattern for tag.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">removing</span><span class="p">(</span><span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L75-L77">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Defaults"></a>
<a name="//apple_ref/swift/Section/Defaults" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Defaults"></a>
<h3 class="section-name"><span>Defaults</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC5basicACvpZ"></a>
<a name="//apple_ref/swift/Variable/basic" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC5basicACvpZ">basic</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Resolver with no rules.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">basic</span><span class="p">:</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L97">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC7defaultACvpZ"></a>
<a name="//apple_ref/swift/Variable/default" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC7defaultACvpZ">default</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Resolver with a default set of rules.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">let</span> <span class="p">`</span><span class="nv">default</span><span class="p">`:</span> <span class="kt">Resolver</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L99">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

656
Classes/Resolver/Rule.html Normal file
View File

@ -0,0 +1,656 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Rule Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Rule" class="dashAnchor"></a>
<a title="Rule Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Rule Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Rule</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Rule</span></code></pre>
</div>
</div>
<p>Rule describing how to resolve tags from regex patterns.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L14-L31">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV3tagAA3TagC4NameVvp"></a>
<a name="//apple_ref/swift/Property/tag" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV3tagAA3TagC4NameVvp">tag</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The tag name this rule applies to.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L16">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV7patternSSvp"></a>
<a name="//apple_ref/swift/Property/pattern" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV7patternSSvp">pattern</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The regex pattern used to resolve this rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">pattern</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleVyAeA3TagC4NameV_SStKcfc"></a>
<a name="//apple_ref/swift/Method/init(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleVyAeA3TagC4NameV_SStKcfc">init(_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create a rule with the specified tag name and regex pattern.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p>Throws an error if the regular expression pattern is invalid.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">,</span> <span class="n">_</span> <span class="nv">pattern</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>tag</em>
</code>
</td>
<td>
<div>
<p>The tag name this rule should apply to.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>pattern</em>
</code>
</td>
<td>
<div>
<p>The regex pattern used to resolve this rule.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L27-L30">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Default%20Resolver%20Rules"></a>
<a name="//apple_ref/swift/Section/Default Resolver Rules" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Default%20Resolver%20Rules"></a>
<h3 class="section-name"><span>Default Resolver Rules</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV4boolAEvpZ"></a>
<a name="//apple_ref/swift/Variable/bool" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV4boolAEvpZ">bool</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default bool resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">bool</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L108">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV3intAEvpZ"></a>
<a name="//apple_ref/swift/Variable/int" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV3intAEvpZ">int</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default int resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">int</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L115">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV5floatAEvpZ"></a>
<a name="//apple_ref/swift/Variable/float" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV5floatAEvpZ">float</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default float resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">float</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L124">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV5mergeAEvpZ"></a>
<a name="//apple_ref/swift/Variable/merge" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV5mergeAEvpZ">merge</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default merge resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">merge</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L133">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV4nullAEvpZ"></a>
<a name="//apple_ref/swift/Variable/null" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV4nullAEvpZ">null</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default null resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">null</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L136">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV9timestampAEvpZ"></a>
<a name="//apple_ref/swift/Variable/timestamp" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV9timestampAEvpZ">timestamp</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default timestamp resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">timestamp</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L143">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams8ResolverC4RuleV5valueAEvpZ"></a>
<a name="//apple_ref/swift/Variable/value" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams8ResolverC4RuleV5valueAEvpZ">value</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Default value resolver rule.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">value</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Resolver.html">Resolver</a></span><span class="o">.</span><span class="kt">Rule</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Resolver.swift#L152">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

558
Classes/Tag.html Normal file
View File

@ -0,0 +1,558 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tag Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/Tag" class="dashAnchor"></a>
<a title="Tag Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Tag Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Tag</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Tag</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Tag</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Tag</span><span class="p">:</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Tags describe the the <em>type</em> of a Node.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L10-L67">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV"></a>
<a name="//apple_ref/swift/Struct/Name" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV">Name</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Tag name.</p>
<a href="../Classes/Tag/Name.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Name</span> <span class="p">:</span> <span class="kt">RawRepresentable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">:</span> <span class="kt">ExpressibleByStringLiteral</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L12-L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC8implicitACvpZ"></a>
<a name="//apple_ref/swift/Variable/implicit" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC8implicitACvpZ">implicit</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Shorthand accessor for <code>Tag(.implicit)</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">implicit</span><span class="p">:</span> <span class="kt">Tag</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L22-L24">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagCyA2C4NameV_AA8ResolverCAA11ConstructorCtcfc"></a>
<a name="//apple_ref/swift/Method/init(_:_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagCyA2C4NameV_AA8ResolverCAA11ConstructorCtcfc">init(_:<wbr>_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create a <code>Tag</code> with the specified name, resolver and constructor.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">name</span><span class="p">:</span> <span class="kt"><a href="../Classes/Tag/Name.html">Name</a></span><span class="p">,</span>
<span class="n">_</span> <span class="nv">resolver</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver.html">Resolver</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">,</span>
<span class="n">_</span> <span class="nv">constructor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html">Constructor</a></span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>name</em>
</code>
</td>
<td>
<div>
<p>Tag name.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>resolver</em>
</code>
</td>
<td>
<div>
<p><code><a href="../Classes/Resolver.html">Resolver</a></code> this tag should use, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>constructor</em>
</code>
</td>
<td>
<div>
<p><code><a href="../Classes/Constructor.html">Constructor</a></code> this tag should use, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L31-L37">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4copy4with8resolver11constructorA2C4NameVSg_AA8ResolverCSgAA11ConstructorCSgtF"></a>
<a name="//apple_ref/swift/Method/copy(with:resolver:constructor:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4copy4with8resolver11constructorA2C4NameVSg_AA8ResolverCSgAA11ConstructorCSgtF">copy(with:<wbr>resolver:<wbr>constructor:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Lens returning a copy of the current <code>Tag</code> with the specified overridden changes.</p>
<div class="aside aside-note">
<p class="aside-title">Note</p>
<p>Omitting or passing nil for a parameter will preserve the current <code>Tag</code>&lsquo;s value in the copy.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">copy</span><span class="p">(</span><span class="n">with</span> <span class="nv">name</span><span class="p">:</span> <span class="kt"><a href="../Classes/Tag/Name.html">Name</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">resolver</span><span class="p">:</span> <span class="kt"><a href="../Classes/Resolver.html">Resolver</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">constructor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Constructor.html">Constructor</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Tag</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>name</em>
</code>
</td>
<td>
<div>
<p>Overridden tag name.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>resolver</em>
</code>
</td>
<td>
<div>
<p>Overridden resolver.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>constructor</em>
</code>
</td>
<td>
<div>
<p>Overridden constructor.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>A copy of the current <code>Tag</code> with the specified overridden changes.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L48-L50">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A textual representation of this tag.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L71-L73">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

878
Classes/Tag/Name.html Normal file
View File

@ -0,0 +1,878 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Name Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Name" class="dashAnchor"></a>
<a title="Name Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Name Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Name</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Name</span> <span class="p">:</span> <span class="kt">RawRepresentable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">:</span> <span class="kt">ExpressibleByStringLiteral</span></code></pre>
</div>
</div>
<p>Tag name.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L12-L19">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV8rawValueSSvp"></a>
<a name="//apple_ref/swift/Property/rawValue" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV8rawValueSSvp">rawValue</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This <code>Tag.Name</code>&lsquo;s raw string value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">rawValue</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L14">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV8rawValueAESS_tcfc"></a>
<a name="//apple_ref/swift/Method/init(rawValue:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV8rawValueAESS_tcfc">init(rawValue:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create a <code>Tag.Name</code> with a raw string value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">rawValue</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L16-L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV8implicitAEvpZ"></a>
<a name="//apple_ref/swift/Variable/implicit" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV8implicitAEvpZ">implicit</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Tag should be resolved by value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">implicit</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L99">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV11nonSpecificAEvpZ"></a>
<a name="//apple_ref/swift/Variable/nonSpecific" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV11nonSpecificAEvpZ">nonSpecific</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Tag should not be resolved by value, and be resolved as .str, .seq or .map.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">nonSpecific</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L101">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV3strAEvpZ"></a>
<a name="//apple_ref/swift/Variable/str" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV3strAEvpZ">str</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:str&rdquo; <a href="http://yaml.org/type/str.html">http://yaml.org/type/str.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">str</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L105">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV3seqAEvpZ"></a>
<a name="//apple_ref/swift/Variable/seq" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV3seqAEvpZ">seq</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:seq&rdquo; <a href="http://yaml.org/type/seq.html">http://yaml.org/type/seq.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">seq</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L107">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV3mapAEvpZ"></a>
<a name="//apple_ref/swift/Variable/map" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV3mapAEvpZ">map</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:map&rdquo; <a href="http://yaml.org/type/map.html">http://yaml.org/type/map.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">map</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L109">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV4boolAEvpZ"></a>
<a name="//apple_ref/swift/Variable/bool" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV4boolAEvpZ">bool</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:bool&rdquo; <a href="http://yaml.org/type/bool.html">http://yaml.org/type/bool.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">bool</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L112">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV5floatAEvpZ"></a>
<a name="//apple_ref/swift/Variable/float" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV5floatAEvpZ">float</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:float&rdquo; <a href="http://yaml.org/type/float.html">http://yaml.org/type/float.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">float</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L114">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV4nullAEvpZ"></a>
<a name="//apple_ref/swift/Variable/null" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV4nullAEvpZ">null</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:null&rdquo; <a href="http://yaml.org/type/null.html">http://yaml.org/type/null.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">null</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L116">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV3intAEvpZ"></a>
<a name="//apple_ref/swift/Variable/int" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV3intAEvpZ">int</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:int&rdquo; <a href="http://yaml.org/type/int.html">http://yaml.org/type/int.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">int</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L118">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV6binaryAEvpZ"></a>
<a name="//apple_ref/swift/Variable/binary" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV6binaryAEvpZ">binary</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:binary&rdquo; <a href="http://yaml.org/type/binary.html">http://yaml.org/type/binary.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">binary</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L121">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV5mergeAEvpZ"></a>
<a name="//apple_ref/swift/Variable/merge" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV5mergeAEvpZ">merge</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:merge&rdquo; <a href="http://yaml.org/type/merge.html">http://yaml.org/type/merge.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">merge</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L123">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV4omapAEvpZ"></a>
<a name="//apple_ref/swift/Variable/omap" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV4omapAEvpZ">omap</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:omap&rdquo; <a href="http://yaml.org/type/omap.html">http://yaml.org/type/omap.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">omap</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L125">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV5pairsAEvpZ"></a>
<a name="//apple_ref/swift/Variable/pairs" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV5pairsAEvpZ">pairs</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:pairs&rdquo; <a href="http://yaml.org/type/pairs.html">http://yaml.org/type/pairs.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">pairs</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L127">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV3setAEvpZ"></a>
<a name="//apple_ref/swift/Variable/set" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV3setAEvpZ">set</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:set&rdquo;. <a href="http://yaml.org/type/set.html">http://yaml.org/type/set.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">set</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L129">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV9timestampAEvpZ"></a>
<a name="//apple_ref/swift/Variable/timestamp" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV9timestampAEvpZ">timestamp</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:timestamp&rdquo; <a href="http://yaml.org/type/timestamp.html">http://yaml.org/type/timestamp.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">timestamp</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L131">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV5valueAEvpZ"></a>
<a name="//apple_ref/swift/Variable/value" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV5valueAEvpZ">value</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:value&rdquo; <a href="http://yaml.org/type/value.html">http://yaml.org/type/value.html</a></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">value</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L133">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams3TagC4NameV4yamlAEvpZ"></a>
<a name="//apple_ref/swift/Variable/yaml" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams3TagC4NameV4yamlAEvpZ">yaml</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>&ldquo;tag:yaml.org,2002:yaml&rdquo; <a href="http://yaml.org/type/yaml.html">http://yaml.org/type/yaml.html</a> We don&rsquo;t support this.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span><span class="o">.</span><span class="kt">Name</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Tag.swift#L135">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

627
Classes/YAMLDecoder.html Normal file
View File

@ -0,0 +1,627 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>YAMLDecoder Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/YAMLDecoder" class="dashAnchor"></a>
<a title="YAMLDecoder Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
YAMLDecoder Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>YAMLDecoder</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">YAMLDecoder</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">YAMLDecoder</span><span class="p">:</span> <span class="kt">TopLevelDecoder</span></code></pre>
</div>
</div>
<p><code>Codable</code>-style <code>Decoder</code> that can be used to decode a <code>Decodable</code> type from a given <code>String</code> and optional
user info mapping. Similar to <code>Foundation.JSONDecoder</code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L13-L68">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLDecoderC8encodingAcA6ParserC8EncodingO_tcfc"></a>
<a name="//apple_ref/swift/Method/init(encoding:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLDecoderC8encodingAcA6ParserC8EncodingO_tcfc">init(encoding:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a <code>YAMLDecoder</code> instance.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">encoding</span><span class="p">:</span> <span class="kt"><a href="../Classes/Parser.html">Parser</a></span><span class="o">.</span><span class="kt">Encoding</span> <span class="o">=</span> <span class="o">.</span><span class="k">default</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>encoding</em>
</code>
</td>
<td>
<div>
<p>Encoding, <code>.default</code> if omitted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L17-L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLDecoderC6decode_4from8userInfoxxm_SSSDys010CodingUserF3KeyVypGtKSeRzlF"></a>
<a name="//apple_ref/swift/Method/decode(_:from:userInfo:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLDecoderC6decode_4from8userInfoxxm_SSSDys010CodingUserF3KeyVypGtKSeRzlF">decode(_:<wbr>from:<wbr>userInfo:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Decode a <code>Decodable</code> type from a given <code>String</code> and optional user info mapping.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code>DecodingError</code> or <code><a href="../Enums/YamlError.html">YamlError</a></code> if something went wrong while decoding.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="n">decode</span><span class="o">&lt;</span><span class="kt">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">T</span><span class="o">.</span><span class="k">Type</span> <span class="o">=</span> <span class="kt">T</span><span class="o">.</span><span class="k">self</span><span class="p">,</span>
<span class="n">from</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
<span class="nv">userInfo</span><span class="p">:</span> <span class="p">[</span><span class="kt">CodingUserInfoKey</span><span class="p">:</span> <span class="kt">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">[:])</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">T</span> <span class="k">where</span> <span class="kt">T</span><span class="p">:</span> <span class="kt">Swift</span><span class="o">.</span><span class="kt">Decodable</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>type</em>
</code>
</td>
<td>
<div>
<p><code>Decodable</code> type to decode.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>yaml</em>
</code>
</td>
<td>
<div>
<p>YAML string to decode.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>userInfo</em>
</code>
</td>
<td>
<div>
<p>Additional key/values which can be used when looking up keys to decode.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>Returns the decoded type <code>T</code>.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L30-L45">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLDecoderC6decode_4from8userInfoxxm_10Foundation4DataVSDys010CodingUserF3KeyVypGtKSeRzlF"></a>
<a name="//apple_ref/swift/Method/decode(_:from:userInfo:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLDecoderC6decode_4from8userInfoxxm_10Foundation4DataVSDys010CodingUserF3KeyVypGtKSeRzlF">decode(_:<wbr>from:<wbr>userInfo:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Decode a <code>Decodable</code> type from a given <code>Data</code> and optional user info mapping.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code>DecodingError</code> or <code><a href="../Enums/YamlError.html">YamlError</a></code> if something went wrong while decoding.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="n">decode</span><span class="o">&lt;</span><span class="kt">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">T</span><span class="o">.</span><span class="k">Type</span> <span class="o">=</span> <span class="kt">T</span><span class="o">.</span><span class="k">self</span><span class="p">,</span>
<span class="n">from</span> <span class="nv">yamlData</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
<span class="nv">userInfo</span><span class="p">:</span> <span class="p">[</span><span class="kt">CodingUserInfoKey</span><span class="p">:</span> <span class="kt">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">[:])</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">T</span> <span class="k">where</span> <span class="kt">T</span><span class="p">:</span> <span class="kt">Swift</span><span class="o">.</span><span class="kt">Decodable</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>type</em>
</code>
</td>
<td>
<div>
<p><code>Decodable</code> type to decode.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>yaml</em>
</code>
</td>
<td>
<div>
<p>YAML data to decode.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>userInfo</em>
</code>
</td>
<td>
<div>
<p>Additional key/values which can be used when looking up keys to decode.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>Returns the decoded type <code>T</code>.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L56-L64">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLDecoderC8encodingAA6ParserC8EncodingOvp"></a>
<a name="//apple_ref/swift/Property/encoding" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLDecoderC8encodingAA6ParserC8EncodingOvp">encoding</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Encoding</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">encoding</span><span class="p">:</span> <span class="kt"><a href="../Classes/Parser.html">Parser</a></span><span class="o">.</span><span class="kt">Encoding</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L67">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/TopLevelDecoder"></a>
<a name="//apple_ref/swift/Section/TopLevelDecoder" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/TopLevelDecoder"></a>
<h3 class="section-name"><span>TopLevelDecoder</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:7Combine15TopLevelDecoderP5InputQa"></a>
<a name="//apple_ref/swift/Alias/Input" class="dashAnchor"></a>
<a class="token" href="#/s:7Combine15TopLevelDecoderP5InputQa">Input</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Input</span> <span class="o">=</span> <span class="kt">Data</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L362">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:7Combine15TopLevelDecoderP6decode_4fromqd__qd__m_5InputQztKSeRd__lF"></a>
<a name="//apple_ref/swift/Method/decode(_:from:)" class="dashAnchor"></a>
<a class="token" href="#/s:7Combine15TopLevelDecoderP6decode_4fromqd__qd__m_5InputQztKSeRd__lF">decode(_:<wbr>from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="n">decode</span><span class="o">&lt;</span><span class="kt">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">T</span><span class="o">.</span><span class="k">Type</span><span class="p">,</span> <span class="nv">from</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">T</span> <span class="k">where</span> <span class="kt">T</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L364-L366">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

468
Classes/YAMLEncoder.html Normal file
View File

@ -0,0 +1,468 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>YAMLEncoder Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/YAMLEncoder" class="dashAnchor"></a>
<a title="YAMLEncoder Class Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
YAMLEncoder Class Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>YAMLEncoder</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">YAMLEncoder</span></code></pre>
</div>
</div>
<p><code>Codable</code>-style <code>Encoder</code> that can be used to encode an <code>Encodable</code> type to a YAML string using optional
user info mapping. Similar to <code>Foundation.JSONEncoder</code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Encoder.swift#L11-L46">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLEncoderC7Optionsa"></a>
<a name="//apple_ref/swift/Alias/Options" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLEncoderC7Optionsa">Options</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Options to use when encoding to YAML.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Options</span> <span class="o">=</span> <span class="kt"><a href="../Classes/Emitter.html">Emitter</a></span><span class="o">.</span><span class="kt">Options</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Encoder.swift#L13">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLEncoderC7optionsAA7EmitterC7OptionsVvp"></a>
<a name="//apple_ref/swift/Property/options" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLEncoderC7optionsAA7EmitterC7OptionsVvp">options</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Options to use when encoding to YAML.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">options</span><span class="p">:</span> <span class="kt">YAMLEncoder</span><span class="o">.</span><span class="kt"><a href="../Classes/YAMLEncoder.html#/s:4Yams11YAMLEncoderC7Optionsa">Options</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Encoder.swift#L16">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLEncoderCACycfc"></a>
<a name="//apple_ref/swift/Method/init()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLEncoderCACycfc">init()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a <code>YAMLEncoder</code> instance.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">()</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Encoder.swift#L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams11YAMLEncoderC6encode_8userInfoSSx_SDys010CodingUserE3KeyVypGtKSERzlF"></a>
<a name="//apple_ref/swift/Method/encode(_:userInfo:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams11YAMLEncoderC6encode_8userInfoSSx_SDys010CodingUserE3KeyVypGtKSERzlF">encode(_:<wbr>userInfo:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Encode a value of type <code>T</code> to a YAML string.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
<p><code>EncodingError</code> if something went wrong while encoding.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="n">encode</span><span class="o">&lt;</span><span class="kt">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">T</span><span class="p">,</span> <span class="nv">userInfo</span><span class="p">:</span> <span class="p">[</span><span class="kt">CodingUserInfoKey</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]</span> <span class="o">=</span> <span class="p">[:])</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt">String</span> <span class="k">where</span> <span class="kt">T</span> <span class="p">:</span> <span class="kt">Encodable</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>value</em>
</code>
</td>
<td>
<div>
<p>Value to encode.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>userInfo</em>
</code>
</td>
<td>
<div>
<p>Additional key/values which can be used when looking up keys to encode.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The YAML string.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Encoder.swift#L29-L45">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

198
Docs.md
View File

@ -1,198 +0,0 @@
# Yams Documentation
For installation instructions, see [README.md](README.md).
API documentation available at [jpsim.com/Yams](https://jpsim.com/Yams).
## Usage
### Consume YAML
Here's a simple example parsing a YAML array of strings:
```swift
import Yams
let yamlString = """
- a
- b
- c
"""
do {
let yamlNode = try Yams.load(yaml: yamlString)
if let yamlArray = yamlNode as? [String] {
print(yamlArray)
}
} catch {
print("handle error: \(error)")
}
// Prints:
// ["a", "b", "c"]
```
### Emit YAML
Here's a simple example emitting YAML string from a Swift `Array<String>`:
```swift
import Yams
do {
let yamlString = try Yams.serialize(node: ["a", "b", "c"])
print(yamlString)
} catch {
print("handle error: \(error)")
}
// Prints:
// - a
// - b
// - c
```
You can even customize the style:
```swift
import Yams
var node: Node = ["a", "b", "c"]
node.sequence?.style = .flow
do {
let yamlString = try Yams.serialize(node: node)
print(yamlString)
} catch {
print("handle error: \(error)")
}
// Prints:
// [a, b, c]
```
### Customize Parsing
For example, say you only want the literals `true` and `false` to represent booleans, unlike the
YAML spec compliant boolean which also includes `on`/`off` and many others.
You can customize Yams' Constructor map:
```swift
import Yams
extension Constructor {
public static func withBoolAsTrueFalse() -> Constructor {
var map = defaultScalarMap
map[.bool] = Bool.constructUsingOnlyTrueAndFalse
return Constructor(map)
}
}
private extension Bool {
static func constructUsingOnlyTrueAndFalse(from scalar: Node.Scalar) -> Bool? {
switch scalar.string.lowercased() {
case "true":
return true
case "false":
return false
default:
return nil
}
}
}
// Usage:
let yamlString = """
- true
- on
- off
- false
"""
if let array = try? Yams.load(yaml: yamlString, .default, .withBoolAsTrueFalse()) as? [Any] {
print(array)
}
// Prints:
// [true, "on", "off", false]
```
### Expanding Environment Variables
For example:
```swift
import Yams
extension Constructor {
public static func withEnv(_ env: [String: String]) -> Constructor {
var map = defaultScalarMap
map[.str] = String.constructExpandingEnvVars(env: env)
return Constructor(map)
}
}
private extension String {
static func constructExpandingEnvVars(env: [String: String]) -> (_ scalar: Node.Scalar) -> String? {
return { (scalar: Node.Scalar) -> String? in
return node.string.expandingEnvVars(env: env)
}
}
func expandingEnvVars(env: [String: String]) -> String {
var result = self
for (key, value) in env {
result = result.replacingOccurrences(of: "${\(key)}", with: value)
}
return result
}
}
// Usage:
let yamlString = """
- first
- ${SECOND}
- SECOND
"""
let env = ["SECOND": "2"]
if let array = try? Yams.load(yaml: yamlString, .default, .withEnv(env)) as? [String] {
print(array)
}
// Prints:
// ["first", "2", "SECOND"]
```
### Converting Between Formats
Because Yams conforms to Swift 4's Codable protocol and provides a YAML Encoder and Decoder,
you can easily convert between YAML and other formats that also provide Swift 4 Encoders and
Decoders, such as JSON and Plist.
### Error Handling
Failable operations in Yams throw Swift errors.
### Types
| Name | Yams Tag | YAML Tag | Swift Types |
|----------------|---------------|-------------------------------|--------------------------------|
| ... | `implicit` | `` | ... |
| ... | `nonSpecific` | `!` | ... |
| String | `str` | `tag:yaml.org,2002:str` | `String` |
| Sequence | `seq` | `tag:yaml.org,2002:seq` | `Array<Any>` |
| Map | `map` | `tag:yaml.org,2002:map` | `Dictionary<AnyHashable, Any>` |
| Boolean | `bool` | `tag:yaml.org,2002:bool` | `Bool` |
| Floating Point | `float` | `tag:yaml.org,2002:float` | ... |
| Null | `null` | `tag:yaml.org,2002:null` | `Void` |
| Integer | `int` | `tag:yaml.org,2002:int` | `FixedWidthInteger` |
| ... | `binary` | `tag:yaml.org,2002:binary` | `Data` |
| ... | `merge` | `tag:yaml.org,2002:merge` | ... |
| ... | `omap` | `tag:yaml.org,2002:omap` | ... |
| ... | `pairs` | `tag:yaml.org,2002:pairs` | ... |
| Set | `set` | `tag:yaml.org,2002:set` | `Set<AnyHashable>` |
| Timestamp | `timestamp` | `tag:yaml.org,2002:timestamp` | `Date` |
| ... | `value` | `tag:yaml.org,2002:value` | ... |
| YAML | `yaml` | `tag:yaml.org,2002:yaml` | Unsupported |

367
Enums.html Normal file
View File

@ -0,0 +1,367 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Enumerations Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
<a title="Enumerations Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">Yams Reference</a>
<img class="carat" src="img/carat.png" alt=""/>
Enumerations Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Enumerations</h1>
<p>The following enumerations are available globally.</p>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO"></a>
<a name="//apple_ref/swift/Enum/Node" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO">Node</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>YAML Node.</p>
<a href="Enums/Node.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Node</span> <span class="p">:</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt">Comparable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt">ExpressibleByDictionaryLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt">ExpressibleByFloatLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt">ExpressibleByIntegerLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt">ExpressibleByStringLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Node</span><span class="p">:</span> <span class="kt"><a href="Protocols/NodeRepresentable.html">NodeRepresentable</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.swift#L12-L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO"></a>
<a name="//apple_ref/swift/Enum/YamlError" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO">YamlError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Errors thrown by Yams APIs.</p>
<a href="Enums/YamlError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">YamlError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">YamlError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L15-L89">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

1798
Enums/Node.html Normal file

File diff suppressed because it is too large Load Diff

724
Enums/Node/Mapping.html Normal file
View File

@ -0,0 +1,724 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mapping Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Mapping" class="dashAnchor"></a>
<a title="Mapping Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Mapping Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Mapping</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Mapping</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">:</span> <span class="kt">Comparable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">:</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">:</span> <span class="kt">ExpressibleByDictionaryLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">:</span> <span class="kt">MutableCollection</span></code></pre>
</div>
</div>
<p>A mapping is the YAML equivalent of a <code>Dictionary</code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L11-L42">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV3tagAA3TagCvp"></a>
<a name="//apple_ref/swift/Property/tag" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV3tagAA3TagCvp">tag</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This mapping&rsquo;s <code><a href="../../Classes/Tag.html">Tag</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L14">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5styleAE5StyleOvp"></a>
<a name="//apple_ref/swift/Property/style" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5styleAE5StyleOvp">style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The style to use when emitting this <code>Mapping</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node/Mapping/Style.html">Style</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L16">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV4markAA4MarkVSgvp"></a>
<a name="//apple_ref/swift/Property/mark" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV4markAA4MarkVSgvp">mark</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This mapping&rsquo;s <code><a href="../../Structs/Mark.html">Mark</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5StyleO"></a>
<a name="//apple_ref/swift/Enum/Style" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5StyleO">Style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The style to use when emitting a <code><a href="../../Enums/Node/Mapping.html">Mapping</a></code>.</p>
<a href="../../Enums/Node/Mapping/Style.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Style</span> <span class="p">:</span> <span class="kt">UInt32</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L21-L28">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingVyAESayAC_ACtG_AA3TagCAE5StyleOAA4MarkVSgtcfc"></a>
<a name="//apple_ref/swift/Method/init(_:_:_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingVyAESayAC_ACtG_AA3TagCAE5StyleOAA4MarkVSgtcfc">init(_:<wbr>_:<wbr>_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create a <code>Node.Mapping</code> using the specified parameters.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">pairs</span><span class="p">:</span> <span class="p">[(</span><span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">,</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">)],</span> <span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">implicit</span><span class="p">,</span> <span class="n">_</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node/Mapping/Style.html">Style</a></span> <span class="o">=</span> <span class="o">.</span><span class="n"><a href="../../Enums/Node.html#/s:4Yams4NodeO3anyypvp">any</a></span><span class="p">,</span> <span class="n">_</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>pairs</em>
</code>
</td>
<td>
<div>
<p>The array of <code>(Node, Node)</code> tuples to generate this mapping.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>tag</em>
</code>
</td>
<td>
<div>
<p>This mapping&rsquo;s <code><a href="../../Classes/Tag.html">Tag</a></code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>style</em>
</code>
</td>
<td>
<div>
<p>The style to use when emitting this <code>Mapping</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mark</em>
</code>
</td>
<td>
<div>
<p>This mapping&rsquo;s <code><a href="../../Structs/Mark.html">Mark</a></code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L36-L41">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Collection"></a>
<a name="//apple_ref/swift/Section/Collection" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Collection"></a>
<h3 class="section-name"><span>Collection</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5Indexa"></a>
<a name="//apple_ref/swift/Alias/Index" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5Indexa">Index</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The index type for this mapping.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Index</span> <span class="o">=</span> <span class="kt">Array</span><span class="o">&lt;</span><span class="kt">Element</span><span class="o">&gt;.</span><span class="kt">Index</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L105">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Dictionary-like%20APIs"></a>
<a name="//apple_ref/swift/Section/Dictionary-like APIs" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Dictionary-like%20APIs"></a>
<h3 class="section-name"><span>Dictionary-like APIs</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV4keyss15LazyMapSequenceVyAeCGvp"></a>
<a name="//apple_ref/swift/Property/keys" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV4keyss15LazyMapSequenceVyAeCGvp">keys</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This mapping&rsquo;s keys. Similar to <code>Dictionary.keys</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">keys</span><span class="p">:</span> <span class="kt">LazyMapCollection</span><span class="o">&lt;</span><span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">,</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">&gt;</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L177-L179">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV6valuess15LazyMapSequenceVyAeCGvp"></a>
<a name="//apple_ref/swift/Property/values" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV6valuess15LazyMapSequenceVyAeCGvp">values</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This mapping&rsquo;s values. Similar to <code>Dictionary.values</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">values</span><span class="p">:</span> <span class="kt">LazyMapCollection</span><span class="o">&lt;</span><span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">,</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">&gt;</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L182-L184">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingVyACSgSScip"></a>
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingVyACSgSScip">subscript(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set or get the <code><a href="../../Enums/Node.html">Node</a></code> for the specified string&rsquo;s <code><a href="../../Enums/Node.html">Node</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">subscript</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L187-L194">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingVyACSgACcip"></a>
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingVyACSgACcip">subscript(_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Set or get the specified <code><a href="../../Enums/Node.html">Node</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">subscript</span><span class="p">(</span><span class="nv">node</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L197-L214">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5index6forKeySiSgAC_tF"></a>
<a name="//apple_ref/swift/Method/index(forKey:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5index6forKeySiSgAC_tF">index(forKey:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Get the index of the specified <code><a href="../../Enums/Node.html">Node</a></code>, if it exists in the mapping.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">index</span><span class="p">(</span><span class="n">forKey</span> <span class="nv">key</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../../Enums/Node/Mapping.html#/s:4Yams4NodeO7MappingV5Indexa">Index</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L217-L219">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,397 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Style Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../../js/jquery.min.js" defer></script>
<script src="../../../js/jazzy.js" defer></script>
<script src="../../../js/lunr.min.js" defer></script>
<script src="../../../js/typeahead.jquery.js" defer></script>
<script src="../../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Style" class="dashAnchor"></a>
<a title="Style Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../../index.html">Yams Reference</a>
<img class="carat" src="../../../img/carat.png" alt=""/>
Style Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Style</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Style</span> <span class="p">:</span> <span class="kt">UInt32</span></code></pre>
</div>
</div>
<p>The style to use when emitting a <code><a href="../../../Enums/Node/Mapping.html">Mapping</a></code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L21-L28">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5StyleO3anyyA2GmF"></a>
<a name="//apple_ref/swift/Element/any" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5StyleO3anyyA2GmF">any</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Let the emitter choose the style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">any</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L23">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5StyleO5blockyA2GmF"></a>
<a name="//apple_ref/swift/Element/block" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5StyleO5blockyA2GmF">block</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The block mapping style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">block</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L25">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO7MappingV5StyleO4flowyA2GmF"></a>
<a name="//apple_ref/swift/Element/flow" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO7MappingV5StyleO4flowyA2GmF">flow</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The flow mapping style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">flow</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Mapping.swift#L27">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

546
Enums/Node/Scalar.html Normal file
View File

@ -0,0 +1,546 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Scalar Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Scalar" class="dashAnchor"></a>
<a title="Scalar Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Scalar Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Scalar</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Scalar</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">:</span> <span class="kt">Comparable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">:</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Scalar node.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L13-L57">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV6stringSSvp"></a>
<a name="//apple_ref/swift/Property/string" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV6stringSSvp">string</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This node&rsquo;s string value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L15-L19">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV3tagAA3TagCvp"></a>
<a name="//apple_ref/swift/Property/tag" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV3tagAA3TagCvp">tag</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This node&rsquo;s tag (its type).</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L21">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5styleAE5StyleOvp"></a>
<a name="//apple_ref/swift/Property/style" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5styleAE5StyleOvp">style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The style to be used when emitting this node.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node/Scalar/Style.html">Style</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L23">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV4markAA4MarkVSgvp"></a>
<a name="//apple_ref/swift/Property/mark" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV4markAA4MarkVSgvp">mark</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The location for this node.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L25">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO"></a>
<a name="//apple_ref/swift/Enum/Style" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO">Style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The style to use when emitting a <code><a href="../../Enums/Node/Scalar.html">Scalar</a></code>.</p>
<a href="../../Enums/Node/Scalar/Style.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Style</span> <span class="p">:</span> <span class="kt">UInt32</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L28-L43">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarVyAESS_AA3TagCAE5StyleOAA4MarkVSgtcfc"></a>
<a name="//apple_ref/swift/Method/init(_:_:_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarVyAESS_AA3TagCAE5StyleOAA4MarkVSgtcfc">init(_:<wbr>_:<wbr>_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create a <code>Node.Scalar</code> using the specified parameters.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">implicit</span><span class="p">,</span> <span class="n">_</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node/Scalar/Style.html">Style</a></span> <span class="o">=</span> <span class="o">.</span><span class="n"><a href="../../Enums/Node.html#/s:4Yams4NodeO3anyypvp">any</a></span><span class="p">,</span> <span class="n">_</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>string</em>
</code>
</td>
<td>
<div>
<p>The string to generate this scalar.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>tag</em>
</code>
</td>
<td>
<div>
<p>This scalar&rsquo;s <code><a href="../../Classes/Tag.html">Tag</a></code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>style</em>
</code>
</td>
<td>
<div>
<p>The style to use when emitting this <code>Scalar</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mark</em>
</code>
</td>
<td>
<div>
<p>This scalar&rsquo;s <code><a href="../../Structs/Mark.html">Mark</a></code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L51-L56">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,487 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Style Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../../js/jquery.min.js" defer></script>
<script src="../../../js/jazzy.js" defer></script>
<script src="../../../js/lunr.min.js" defer></script>
<script src="../../../js/typeahead.jquery.js" defer></script>
<script src="../../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Style" class="dashAnchor"></a>
<a title="Style Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../../index.html">Yams Reference</a>
<img class="carat" src="../../../img/carat.png" alt=""/>
Style Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Style</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Style</span> <span class="p">:</span> <span class="kt">UInt32</span></code></pre>
</div>
</div>
<p>The style to use when emitting a <code><a href="../../../Enums/Node/Scalar.html">Scalar</a></code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L28-L43">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO3anyyA2GmF"></a>
<a name="//apple_ref/swift/Element/any" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO3anyyA2GmF">any</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Let the emitter choose the style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">any</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L30">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO5plainyA2GmF"></a>
<a name="//apple_ref/swift/Element/plain" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO5plainyA2GmF">plain</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The plain scalar style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">plain</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L32">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO12singleQuotedyA2GmF"></a>
<a name="//apple_ref/swift/Element/singleQuoted" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO12singleQuotedyA2GmF">singleQuoted</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The single-quoted scalar style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">singleQuoted</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L35">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO12doubleQuotedyA2GmF"></a>
<a name="//apple_ref/swift/Element/doubleQuoted" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO12doubleQuotedyA2GmF">doubleQuoted</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The double-quoted scalar style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">doubleQuoted</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L37">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO7literalyA2GmF"></a>
<a name="//apple_ref/swift/Element/literal" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO7literalyA2GmF">literal</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The literal scalar style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">literal</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L40">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO6ScalarV5StyleO6foldedyA2GmF"></a>
<a name="//apple_ref/swift/Element/folded" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO6ScalarV5StyleO6foldedyA2GmF">folded</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The folded scalar style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">folded</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Scalar.swift#L42">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

520
Enums/Node/Sequence.html Normal file
View File

@ -0,0 +1,520 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sequence Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Sequence" class="dashAnchor"></a>
<a title="Sequence Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Sequence Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Sequence</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Sequence</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">Comparable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">Equatable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">MutableCollection</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">RandomAccessCollection</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">:</span> <span class="kt">RangeReplaceableCollection</span></code></pre>
</div>
</div>
<p>Sequence node.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L13-L44">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV3tagAA3TagCvp"></a>
<a name="//apple_ref/swift/Property/tag" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV3tagAA3TagCvp">tag</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This node&rsquo;s tag (its type).</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L16">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV5styleAE5StyleOvp"></a>
<a name="//apple_ref/swift/Property/style" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV5styleAE5StyleOvp">style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The style to be used when emitting this node.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node/Sequence/Style.html">Style</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV4markAA4MarkVSgvp"></a>
<a name="//apple_ref/swift/Property/mark" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV4markAA4MarkVSgvp">mark</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The location for this node.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span><span class="p">?</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L20">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV5StyleO"></a>
<a name="//apple_ref/swift/Enum/Style" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV5StyleO">Style</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The style to use when emitting a <code><a href="../../Enums/Node/Sequence.html">Sequence</a></code>.</p>
<a href="../../Enums/Node/Sequence/Style.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Style</span> <span class="p">:</span> <span class="kt">UInt32</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L23-L30">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceVyAESayACG_AA3TagCAE5StyleOAA4MarkVSgtcfc"></a>
<a name="//apple_ref/swift/Method/init(_:_:_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceVyAESayACG_AA3TagCAE5StyleOAA4MarkVSgtcfc">init(_:<wbr>_:<wbr>_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Create a <code>Node.Sequence</code> using the specified parameters.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">nodes</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../../Enums/Node.html">Node</a></span><span class="p">],</span> <span class="n">_</span> <span class="nv">tag</span><span class="p">:</span> <span class="kt"><a href="../../Classes/Tag.html">Tag</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">implicit</span><span class="p">,</span> <span class="n">_</span> <span class="nv">style</span><span class="p">:</span> <span class="kt"><a href="../../Enums/Node/Sequence/Style.html">Style</a></span> <span class="o">=</span> <span class="o">.</span><span class="n"><a href="../../Enums/Node.html#/s:4Yams4NodeO3anyypvp">any</a></span><span class="p">,</span> <span class="n">_</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>nodes</em>
</code>
</td>
<td>
<div>
<p>The array of nodes to generate this sequence.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>tag</em>
</code>
</td>
<td>
<div>
<p>This sequence&rsquo;s <code><a href="../../Classes/Tag.html">Tag</a></code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>style</em>
</code>
</td>
<td>
<div>
<p>The style to use when emitting this <code>Sequence</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mark</em>
</code>
</td>
<td>
<div>
<p>This sequence&rsquo;s <code><a href="../../Structs/Mark.html">Mark</a></code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L38-L43">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,397 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Style Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../../js/jquery.min.js" defer></script>
<script src="../../../js/jazzy.js" defer></script>
<script src="../../../js/lunr.min.js" defer></script>
<script src="../../../js/typeahead.jquery.js" defer></script>
<script src="../../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Style" class="dashAnchor"></a>
<a title="Style Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../../index.html">Yams Reference</a>
<img class="carat" src="../../../img/carat.png" alt=""/>
Style Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Style</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Style</span> <span class="p">:</span> <span class="kt">UInt32</span></code></pre>
</div>
</div>
<p>The style to use when emitting a <code><a href="../../../Enums/Node/Sequence.html">Sequence</a></code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L23-L30">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV5StyleO3anyyA2GmF"></a>
<a name="//apple_ref/swift/Element/any" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV5StyleO3anyyA2GmF">any</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Let the emitter choose the style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">any</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L25">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV5StyleO5blockyA2GmF"></a>
<a name="//apple_ref/swift/Element/block" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV5StyleO5blockyA2GmF">block</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The block sequence style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">block</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L27">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams4NodeO8SequenceV5StyleO4flowyA2GmF"></a>
<a name="//apple_ref/swift/Element/flow" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams4NodeO8SequenceV5StyleO4flowyA2GmF">flow</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The flow sequence style.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">flow</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Node.Sequence.swift#L29">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

965
Enums/YamlError.html Normal file
View File

@ -0,0 +1,965 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>YamlError Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/YamlError" class="dashAnchor"></a>
<a title="YamlError Enumeration Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
YamlError Enumeration Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>YamlError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">YamlError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">YamlError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<p>Errors thrown by Yams APIs.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L15-L89">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO2noyA2CmF"></a>
<a name="//apple_ref/swift/Element/no" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO2noyA2CmF">no</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_NO_ERROR</code>. No error is produced.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">no</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L18">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO6memoryyA2CmF"></a>
<a name="//apple_ref/swift/Element/memory" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO6memoryyA2CmF">memory</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_MEMORY_ERROR</code>. Cannot allocate or reallocate a block of memory.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">memory</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L21">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO6readeryACSS_SiSgs5Int32VSStcACmF"></a>
<a name="//apple_ref/swift/Element/reader(problem:offset:value:yaml:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO6readeryACSS_SiSgs5Int32VSStcACmF">reader(problem:<wbr>offset:<wbr>value:<wbr>yaml:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_READER_ERROR</code>. Cannot read or decode the input stream.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">reader</span><span class="p">(</span><span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">offset</span><span class="p">:</span> <span class="kt">Int</span><span class="p">?,</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">Int32</span><span class="p">,</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>offset</em>
</code>
</td>
<td>
<div>
<p>The offset from <code>yaml.startIndex</code> at which the problem occured.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>value</em>
</code>
</td>
<td>
<div>
<p>The problematic value (-1 is none).</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>yaml</em>
</code>
</td>
<td>
<div>
<p>YAML String which the problem occured while reading.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L30">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO7scanneryA2C7ContextVSg_SSAA4MarkVSStcACmF"></a>
<a name="//apple_ref/swift/Element/scanner(context:problem:_:yaml:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO7scanneryA2C7ContextVSg_SSAA4MarkVSStcACmF">scanner(context:<wbr>problem:<wbr>_:<wbr>yaml:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_SCANNER_ERROR</code>. Cannot scan the input stream.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">scanner</span><span class="p">(</span><span class="nv">context</span><span class="p">:</span> <span class="kt"><a href="../Enums/YamlError/Context.html">Context</a></span><span class="p">?,</span> <span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="kt"><a href="../Structs/Mark.html">Mark</a></span><span class="p">,</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>context</em>
</code>
</td>
<td>
<div>
<p>Error context.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mark</em>
</code>
</td>
<td>
<div>
<p>Problem position.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>yaml</em>
</code>
</td>
<td>
<div>
<p>YAML String which the problem occured while scanning.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L39">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO6parseryA2C7ContextVSg_SSAA4MarkVSStcACmF"></a>
<a name="//apple_ref/swift/Element/parser(context:problem:_:yaml:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO6parseryA2C7ContextVSg_SSAA4MarkVSStcACmF">parser(context:<wbr>problem:<wbr>_:<wbr>yaml:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_PARSER_ERROR</code>. Cannot parse the input stream.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">parser</span><span class="p">(</span><span class="nv">context</span><span class="p">:</span> <span class="kt"><a href="../Enums/YamlError/Context.html">Context</a></span><span class="p">?,</span> <span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="kt"><a href="../Structs/Mark.html">Mark</a></span><span class="p">,</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>context</em>
</code>
</td>
<td>
<div>
<p>Error context.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mark</em>
</code>
</td>
<td>
<div>
<p>Problem position.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>yaml</em>
</code>
</td>
<td>
<div>
<p>YAML String which the problem occured while parsing.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L47">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO8composeryA2C7ContextVSg_SSAA4MarkVSStcACmF"></a>
<a name="//apple_ref/swift/Element/composer(context:problem:_:yaml:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO8composeryA2C7ContextVSg_SSAA4MarkVSStcACmF">composer(context:<wbr>problem:<wbr>_:<wbr>yaml:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_COMPOSER_ERROR</code>. Cannot compose a YAML document.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">composer</span><span class="p">(</span><span class="nv">context</span><span class="p">:</span> <span class="kt"><a href="../Enums/YamlError/Context.html">Context</a></span><span class="p">?,</span> <span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="kt"><a href="../Structs/Mark.html">Mark</a></span><span class="p">,</span> <span class="nv">yaml</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>context</em>
</code>
</td>
<td>
<div>
<p>Error context.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>mark</em>
</code>
</td>
<td>
<div>
<p>Problem position.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>yaml</em>
</code>
</td>
<td>
<div>
<p>YAML String which the problem occured while composing.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L55">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO6writeryACSS_tcACmF"></a>
<a name="//apple_ref/swift/Element/writer(problem:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO6writeryACSS_tcACmF">writer(problem:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_WRITER_ERROR</code>. Cannot write to the output stream.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">writer</span><span class="p">(</span><span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L61">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO7emitteryACSS_tcACmF"></a>
<a name="//apple_ref/swift/Element/emitter(problem:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO7emitteryACSS_tcACmF">emitter(problem:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p><code>YAML_EMITTER_ERROR</code>. Cannot emit a YAML stream.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">emitter</span><span class="p">(</span><span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L66">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO11representeryACSS_tcACmF"></a>
<a name="//apple_ref/swift/Element/representer(problem:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO11representeryACSS_tcACmF">representer(problem:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Used in <code><a href="../Protocols/NodeRepresentable.html">NodeRepresentable</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">representer</span><span class="p">(</span><span class="nv">problem</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>problem</em>
</code>
</td>
<td>
<div>
<p>Error description.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L71">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO21dataCouldNotBeDecodedyACSS10FoundationE8EncodingV_tcACmF"></a>
<a name="//apple_ref/swift/Element/dataCouldNotBeDecoded(encoding:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO21dataCouldNotBeDecodedyACSS10FoundationE8EncodingV_tcACmF">dataCouldNotBeDecoded(encoding:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>String data could not be decoded with the specified encoding.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">dataCouldNotBeDecoded</span><span class="p">(</span><span class="nv">encoding</span><span class="p">:</span> <span class="kt">String</span><span class="o">.</span><span class="kt">Encoding</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>encoding</em>
</code>
</td>
<td>
<div>
<p>The string encoding used to decode the string data.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L76">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO7ContextV"></a>
<a name="//apple_ref/swift/Struct/Context" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO7ContextV">Context</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The error context.</p>
<a href="../Enums/YamlError/Context.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Context</span> <span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L79-L88">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A textual representation of this instance.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L155-L179">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,397 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Context Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset="utf-8">
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
<script src="../../js/lunr.min.js" defer></script>
<script src="../../js/typeahead.jquery.js" defer></script>
<script src="../../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Context" class="dashAnchor"></a>
<a title="Context Structure Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../../index.html">Yams Reference</a>
<img class="carat" src="../../img/carat.png" alt=""/>
Context Structure Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Context</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Context</span> <span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<p>The error context.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L79-L88">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO7ContextV4textSSvp"></a>
<a name="//apple_ref/swift/Property/text" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO7ContextV4textSSvp">text</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Context text.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L81">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO7ContextV4markAA4MarkVvp"></a>
<a name="//apple_ref/swift/Property/mark" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO7ContextV4markAA4MarkVvp">mark</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Context position.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../../Structs/Mark.html">Mark</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L83">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams9YamlErrorO7ContextV11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams9YamlErrorO7ContextV11descriptionSSvp">description</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A textual representation of this instance.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/YamlError.swift#L85-L87">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

1389
Extensions.html Normal file

File diff suppressed because it is too large Load Diff

506
Extensions/Array.html Normal file
View File

@ -0,0 +1,506 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Array Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Array" class="dashAnchor"></a>
<a title="Array Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Array Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Array</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Array</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Array</span><span class="p">:</span> <span class="kt"><a href="../Protocols/NodeRepresentable.html">NodeRepresentable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sa4YamsE13construct_seq4fromSayypGAA4NodeO8SequenceV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct_seq(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Sa4YamsE13construct_seq4fromSayypGAA4NodeO8SequenceV_tFZ">construct_seq(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an Array of <code>Any</code> from the specified <code>sequence</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct_seq</span><span class="p">(</span><span class="n">from</span> <span class="nv">sequence</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>sequence</em>
</code>
</td>
<td>
<div>
<p>Sequence to convert to <code>Array&lt;Any&gt;</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>Array of <code>Any</code>.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L454-L456">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:Sa4YamsE14construct_omap4fromSayyp_yptGAA4NodeO8SequenceV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct_omap(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Sa4YamsE14construct_omap4fromSayyp_yptGAA4NodeO8SequenceV_tFZ">construct_omap(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an &ldquo;O-map&rdquo; (array of <code>(Any, Any)</code> tuples) from the specified <code>sequence</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct_omap</span><span class="p">(</span><span class="n">from</span> <span class="nv">sequence</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[(</span><span class="kt">Any</span><span class="p">,</span> <span class="kt">Any</span><span class="p">)]</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>sequence</em>
</code>
</td>
<td>
<div>
<p>Sequence to convert to <code>Array&lt;(Any, Any)&gt;</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>Array of <code>(Any, Any)</code> tuples.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L463-L470">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:Sa4YamsE15construct_pairs4fromSayyp_yptGAA4NodeO8SequenceV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct_pairs(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Sa4YamsE15construct_pairs4fromSayyp_yptGAA4NodeO8SequenceV_tFZ">construct_pairs(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an array of <code>(Any, Any)</code> tuples from the specified <code>sequence</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct_pairs</span><span class="p">(</span><span class="n">from</span> <span class="nv">sequence</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Sequence</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[(</span><span class="kt">Any</span><span class="p">,</span> <span class="kt">Any</span><span class="p">)]</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>sequence</em>
</code>
</td>
<td>
<div>
<p>Sequence to convert to <code>Array&lt;(Any, Any)&gt;</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>Array of <code>(Any, Any)</code> tuples.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L477-L484">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/NodeRepresentable"></a>
<a name="//apple_ref/swift/Section/NodeRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/NodeRepresentable"></a>
<h3 class="section-name"><span>NodeRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sa4YamsE11representedAA4NodeOyKF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:Sa4YamsE11representedAA4NodeOyKF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html">Node</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L50-L53">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,333 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>BinaryInteger Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/BinaryInteger" class="dashAnchor"></a>
<a title="BinaryInteger Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
BinaryInteger Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>BinaryInteger</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">BinaryInteger</span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sz4YamsE11representedAA4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:Sz4YamsE11representedAA4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L207-L209">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

401
Extensions/Bool.html Normal file
View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bool Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Bool" class="dashAnchor"></a>
<a title="Bool Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Bool Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Bool</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Bool</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Bool</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Bool</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sb4YamsE9construct4fromSbSgAA4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Sb4YamsE9construct4fromSbSgAA4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Bool</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Bool</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Bool</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L139-L148">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sb4YamsE11representedAA4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:Sb4YamsE11representedAA4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L96-L98">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

401
Extensions/Data.html Normal file
View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Data Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Data" class="dashAnchor"></a>
<a title="Data Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Data Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Data</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Data</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Data</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Data</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4DataV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4DataV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Data</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Data</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Data</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Data</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L159-L161">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4DataV4YamsE11representedAD4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4DataV4YamsE11representedAD4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L103-L105">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

444
Extensions/Date.html Normal file
View File

@ -0,0 +1,444 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Date Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Date" class="dashAnchor"></a>
<a title="Date Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Date Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Date</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Date</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Date</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Date</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4DateV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4DateV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Date</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Date</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Date</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Date</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L172-L216">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4DateV4YamsE11representedAD4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4DateV4YamsE11representedAD4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L110-L112">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentableCustomizedForCodable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentableCustomizedForCodable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentableCustomizedForCodable"></a>
<h3 class="section-name"><span>ScalarRepresentableCustomizedForCodable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4DateV4YamsE3boxAD4NodeOyF"></a>
<a name="//apple_ref/swift/Method/box()" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4DateV4YamsE3boxAD4NodeOyF">box()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns this value wrapped in a <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">box</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L298-L300">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

401
Extensions/Decimal.html Normal file
View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Decimal Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Decimal" class="dashAnchor"></a>
<a title="Decimal Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Decimal Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Decimal</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Decimal</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Decimal</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Decimal</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:So9NSDecimala4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:So9NSDecimala4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Decimal</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Decimal</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Decimal</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Decimal</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L329-L331">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:So9NSDecimala4YamsE11representedAC4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:So9NSDecimala4YamsE11representedAC4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L237-L239">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

333
Extensions/Decoder.html Normal file
View File

@ -0,0 +1,333 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Decoder Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Decoder" class="dashAnchor"></a>
<a title="Decoder Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Decoder Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Decoder</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Decoder</span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:s7DecoderP4YamsE4markAC4MarkVSgvp"></a>
<a name="//apple_ref/swift/Property/mark" class="dashAnchor"></a>
<a class="token" href="#/s:s7DecoderP4YamsE4markAC4MarkVSgvp">mark</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The <code><a href="../Structs/Mark.html">Mark</a></code> for the underlying <code><a href="../Enums/Node.html">Node</a></code> that has been decoded.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">mark</span><span class="p">:</span> <span class="kt"><a href="../Structs/Mark.html">Mark</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L351-L353">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

400
Extensions/Dictionary.html Normal file
View File

@ -0,0 +1,400 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dictionary Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Dictionary" class="dashAnchor"></a>
<a title="Dictionary Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Dictionary Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Dictionary</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Dictionary</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Dictionary</span><span class="p">:</span> <span class="kt"><a href="../Protocols/NodeRepresentable.html">NodeRepresentable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:SD4YamsE17construct_mapping4fromSDys11AnyHashableVypGSgAA4NodeO7MappingV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct_mapping(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:SD4YamsE17construct_mapping4fromSDys11AnyHashableVypGSgAA4NodeO7MappingV_tFZ">construct_mapping(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct a <code>Dictionary</code>, if possible, from the specified mapping.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct_mapping</span><span class="p">(</span><span class="n">from</span> <span class="nv">mapping</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">AnyHashable</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>mapping</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Mapping.html">Node.Mapping</a></code> from which to extract a <code>Dictionary</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>[AnyHashable: Any]</code>, if one was successfully extracted from the mapping.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L416-L418">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/NodeRepresentable"></a>
<a name="//apple_ref/swift/Section/NodeRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/NodeRepresentable"></a>
<h3 class="section-name"><span>NodeRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:SD4YamsE11representedAA4NodeOyKF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:SD4YamsE11representedAA4NodeOyKF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html">Node</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L58-L61">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

388
Extensions/Double.html Normal file
View File

@ -0,0 +1,388 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Double Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Double" class="dashAnchor"></a>
<a title="Double Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Double Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Double</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Double</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Double</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Double</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Double</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sd4YamsE11representedAA4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:Sd4YamsE11representedAA4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L174-L176">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentableCustomizedForCodable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentableCustomizedForCodable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentableCustomizedForCodable"></a>
<h3 class="section-name"><span>ScalarRepresentableCustomizedForCodable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sd4YamsE3boxAA4NodeOyF"></a>
<a name="//apple_ref/swift/Method/box()" class="dashAnchor"></a>
<a class="token" href="#/s:Sd4YamsE3boxAA4NodeOyF">box()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns this value wrapped in a <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">box</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L305-L307">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,432 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>FixedWidthInteger Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/FixedWidthInteger" class="dashAnchor"></a>
<a title="FixedWidthInteger Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
FixedWidthInteger Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>FixedWidthInteger</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">FixedWidthInteger</span> <span class="k">where</span> <span class="k">Self</span><span class="p">:</span> <span class="kt">SignedInteger</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">FixedWidthInteger</span> <span class="k">where</span> <span class="k">Self</span><span class="p">:</span> <span class="kt">UnsignedInteger</span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<div class="task-name-container">
<a name="/Available%20where%20%60Self%60%3A%20%60SignedInteger%60"></a>
<a name="//apple_ref/swift/Section/Available where `Self`: `SignedInteger`" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60SignedInteger%60"></a>
<h3 class="section-name"><span>Available where <code>Self</code>: <code>SignedInteger</code></span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:s17FixedWidthIntegerP4YamsSZRzrlE9construct4fromxSgAC4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:s17FixedWidthIntegerP4YamsSZRzrlE9construct4fromxSgAC4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Self</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Self</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Self</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L290-L292">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Available%20where%20%60Self%60%3A%20%60UnsignedInteger%60"></a>
<a name="//apple_ref/swift/Section/Available where `Self`: `UnsignedInteger`" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60UnsignedInteger%60"></a>
<h3 class="section-name"><span>Available where <code>Self</code>: <code>UnsignedInteger</code></span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:s17FixedWidthIntegerP4YamsSURzrlE9construct4fromxSgAC4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:s17FixedWidthIntegerP4YamsSURzrlE9construct4fromxSgAC4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Self</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Self</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Self</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L303-L305">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

388
Extensions/Float.html Normal file
View File

@ -0,0 +1,388 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Float Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Float" class="dashAnchor"></a>
<a title="Float Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Float Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Float</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Float</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Float</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Float</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Float</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sf4YamsE11representedAA4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:Sf4YamsE11representedAA4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L181-L183">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentableCustomizedForCodable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentableCustomizedForCodable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentableCustomizedForCodable"></a>
<h3 class="section-name"><span>ScalarRepresentableCustomizedForCodable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sf4YamsE3boxAA4NodeOyF"></a>
<a name="//apple_ref/swift/Method/box()" class="dashAnchor"></a>
<a class="token" href="#/s:Sf4YamsE3boxAA4NodeOyF">box()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns this value wrapped in a <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">box</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L312-L314">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

359
Extensions/Int.html Normal file
View File

@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Int Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Int" class="dashAnchor"></a>
<a title="Int Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Int Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Int</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Si4YamsE9construct4fromSiSgAA4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Si4YamsE9construct4fromSiSgAA4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Int</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Int</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Int</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Int</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L317-L319">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

359
Extensions/Int64.html Normal file
View File

@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Int64 Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Int64" class="dashAnchor"></a>
<a title="Int64 Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Int64 Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Int64</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Int64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:s5Int64V4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:s5Int64V4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Int64</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Int64</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Int64</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Int64</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L343-L345">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

400
Extensions/NSNull.html Normal file
View File

@ -0,0 +1,400 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>NSNull Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/NSNull" class="dashAnchor"></a>
<a title="NSNull Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
NSNull Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>NSNull</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">NSNull</span><span class="cm">/*: ScalarConstructible*/</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">NSNull</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:So6NSNullC4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:So6NSNullC4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>NSNull</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">NSNull</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>NSNull</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>NSNull</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L398-L405">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:So6NSNullC4YamsE11representedAC4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:So6NSNullC4YamsE11representedAC4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L89-L91">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

333
Extensions/Optional.html Normal file
View File

@ -0,0 +1,333 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Optional Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Optional" class="dashAnchor"></a>
<a title="Optional Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Optional Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Optional</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Optional</span><span class="p">:</span> <span class="kt"><a href="../Protocols/NodeRepresentable.html">NodeRepresentable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sq4YamsE11representedAA4NodeOyKF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:Sq4YamsE11representedAA4NodeOyKF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L225-L232">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

356
Extensions/Set.html Normal file
View File

@ -0,0 +1,356 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Set Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/Set" class="dashAnchor"></a>
<a title="Set Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
Set Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Set</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Set</span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Sh4YamsE13construct_set4fromShys11AnyHashableVGSgAA4NodeO7MappingV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct_set(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Sh4YamsE13construct_set4fromShys11AnyHashableVGSgAA4NodeO7MappingV_tFZ">construct_set(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct a <code>Set</code>, if possible, from the specified mapping.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct_set</span><span class="p">(</span><span class="n">from</span> <span class="nv">mapping</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Mapping</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Set</span><span class="o">&lt;</span><span class="kt">AnyHashable</span><span class="o">&gt;</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>mapping</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Mapping.html">Node.Mapping</a></code> from which to extract a <code>Set</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Set&lt;AnyHashable&gt;</code>, if one was successfully extracted from the mapping.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L438-L443">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

454
Extensions/String.html Normal file
View File

@ -0,0 +1,454 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>String Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/String" class="dashAnchor"></a>
<a title="String Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
String Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>String</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">String</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">String</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">String</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:SS4YamsE9construct4fromSSSgAA4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:SS4YamsE9construct4fromSSSgAA4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>String</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>String</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>String</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L369-L371">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:SS4YamsE9construct4fromSSSgAA4NodeO_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:SS4YamsE9construct4fromSSSgAA4NodeO_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>String</code>, if possible, from the specified <code><a href="../Enums/Node.html">Node</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">node</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>node</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node.html">Node</a></code> from which to extract a value of type <code>String</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>String</code>, if one was successfully extracted from the node.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L378-L387">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:SS4YamsE11representedAA4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:SS4YamsE11representedAA4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L251-L254">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

359
Extensions/UInt.html Normal file
View File

@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>UInt Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/UInt" class="dashAnchor"></a>
<a title="UInt Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
UInt Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>UInt</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:Su4YamsE9construct4fromSuSgAA4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:Su4YamsE9construct4fromSuSgAA4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>UInt</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UInt</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>UInt</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>UInt</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L330-L332">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

359
Extensions/UInt64.html Normal file
View File

@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>UInt64 Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/UInt64" class="dashAnchor"></a>
<a title="UInt64 Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
UInt64 Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>UInt64</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UInt64</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:s6UInt64V4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:s6UInt64V4YamsE9construct4fromABSgAC4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>UInt64</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UInt64</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>UInt64</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>UInt64</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L356-L358">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

401
Extensions/URL.html Normal file
View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>URL Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/URL" class="dashAnchor"></a>
<a title="URL Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
URL Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>URL</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">URL</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">URL</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">URL</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation3URLV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation3URLV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>URL</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">URL</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>URL</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>URL</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Decoder.swift#L342-L344">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation3URLV4YamsE11representedAD4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation3URLV4YamsE11representedAD4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L244-L246">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

401
Extensions/UUID.html Normal file
View File

@ -0,0 +1,401 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>UUID Extension Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Extension/UUID" class="dashAnchor"></a>
<a title="UUID Extension Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
UUID Extension Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>UUID</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UUID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarConstructible.html">ScalarConstructible</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UUID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">UUID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/YAMLEncodable.html">YAMLEncodable</a></span></code></pre>
</div>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4UUIDV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4UUIDV4YamsE9construct4fromACSgAD4NodeO6ScalarV_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>UUID</code>, if possible, from the specified scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UUID</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>UUID</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>UUID</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L126-L128">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:10Foundation4UUIDV4YamsE11representedAD4NodeO6ScalarVyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:10Foundation4UUIDV4YamsE11representedAD4NodeO6ScalarVyF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L259-L261">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

1499
Functions.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
source 'https://rubygems.org'
gem 'cocoapods'
gem "jazzy"

View File

@ -1,118 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.5)
rexml
activesupport (6.1.7.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jazzy (0.14.2)
cocoapods (~> 1.5)
mustache (~> 1.1)
open4 (~> 1.3)
redcarpet (~> 3.4)
rexml (~> 3.2)
rouge (>= 2.0.6, < 4.0)
sassc (~> 2.1)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (2.6.3)
liferaft (0.0.6)
minitest (5.18.0)
molinillo (0.8.0)
mustache (1.1.1)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
open4 (1.3.4)
public_suffix (4.0.7)
redcarpet (3.5.1)
rexml (3.2.5)
rouge (3.28.0)
ruby-macho (2.5.1)
sassc (2.4.0)
ffi (~> 1.9)
sqlite3 (1.4.2)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.7)
PLATFORMS
ruby
DEPENDENCIES
cocoapods
jazzy
BUNDLED WITH
2.3.8

21
LICENSE
View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 JP Simard.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,10 +0,0 @@
module(
name = "yams",
version = "5.0.5",
compatibility_level = 1,
)
bazel_dep(name = "rules_swift", version = "1.5.1", repo_name = "build_bazel_rules_swift")
bazel_dep(name = "platforms", version = "0.0.6", dev_dependency = True)
bazel_dep(name = "rules_apple", version = "2.0.0", dev_dependency = True)

View File

@ -1,30 +0,0 @@
// swift-tools-version:5.4
import PackageDescription
let package = Package(
name: "Yams",
products: [
.library(name: "Yams", targets: ["Yams"])
],
dependencies: [],
targets: [
.target(
name: "CYaml",
exclude: ["CMakeLists.txt"],
cSettings: [.define("YAML_DECLARE_STATIC")]
),
.target(
name: "Yams",
dependencies: ["CYaml"],
exclude: ["CMakeLists.txt"]
),
.testTarget(
name: "YamsTests",
dependencies: ["Yams"],
exclude: ["CMakeLists.txt"],
resources: [
.copy("Fixtures/SourceKitten#289/debug.yaml"),
]
)
]
)

513
Protocols.html Normal file
View File

@ -0,0 +1,513 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Protocols Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset="utf-8">
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
<script src="js/lunr.min.js" defer></script>
<script src="js/typeahead.jquery.js" defer></script>
<script src="js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
<a title="Protocols Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">Yams Reference</a>
<img class="carat" src="img/carat.png" alt=""/>
Protocols Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>Protocols</h1>
<p>The following protocols are available globally.</p>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarConstructible"></a>
<a name="//apple_ref/swift/Section/ScalarConstructible" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarConstructible"></a>
<h3 class="section-name"><span>ScalarConstructible</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams19ScalarConstructibleP"></a>
<a name="//apple_ref/swift/Protocol/ScalarConstructible" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams19ScalarConstructibleP">ScalarConstructible</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Types conforming to this protocol can be extracted <code><a href="Enums/Node/Scalar.html">Node.Scalar</a></code>s.</p>
<a href="Protocols/ScalarConstructible.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ScalarConstructible</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L106-L116">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/SexagesimalConvertible"></a>
<a name="//apple_ref/swift/Section/SexagesimalConvertible" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/SexagesimalConvertible"></a>
<h3 class="section-name"><span>SexagesimalConvertible</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams22SexagesimalConvertibleP"></a>
<a name="//apple_ref/swift/Protocol/SexagesimalConvertible" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams22SexagesimalConvertibleP">SexagesimalConvertible</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Confirming types are convertible to base 60 numeric values.</p>
<a href="Protocols/SexagesimalConvertible.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SexagesimalConvertible</span> <span class="p">:</span> <span class="kt">ExpressibleByIntegerLiteral</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L503-L526">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/NodeRepresentable"></a>
<a name="//apple_ref/swift/Section/NodeRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/NodeRepresentable"></a>
<h3 class="section-name"><span>NodeRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams17NodeRepresentableP"></a>
<a name="//apple_ref/swift/Protocol/NodeRepresentable" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams17NodeRepresentableP">NodeRepresentable</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Type is representable as <code><a href="Enums/Node.html">Node</a></code>.</p>
<a href="Protocols/NodeRepresentable.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">NodeRepresentable</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L36-L39">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentable"></a>
<h3 class="section-name"><span>ScalarRepresentable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams19ScalarRepresentableP"></a>
<a name="//apple_ref/swift/Protocol/ScalarRepresentable" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams19ScalarRepresentableP">ScalarRepresentable</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Type is representable as <code><a href="Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code>.</p>
<a href="Protocols/ScalarRepresentable.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ScalarRepresentable</span> <span class="p">:</span> <span class="kt"><a href="Protocols/NodeRepresentable.html">NodeRepresentable</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L75-L78">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/ScalarRepresentableCustomizedForCodable"></a>
<a name="//apple_ref/swift/Section/ScalarRepresentableCustomizedForCodable" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/ScalarRepresentableCustomizedForCodable"></a>
<h3 class="section-name"><span>ScalarRepresentableCustomizedForCodable</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams13YAMLEncodableP"></a>
<a name="//apple_ref/swift/Protocol/YAMLEncodable" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams13YAMLEncodableP">YAMLEncodable</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Types conforming to this protocol can be encoded by <code>YamlEncoder</code>.</p>
<a href="Protocols/YAMLEncodable.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">YAMLEncodable</span> <span class="p">:</span> <span class="kt">Encodable</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L267-L270">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,337 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>NodeRepresentable Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/NodeRepresentable" class="dashAnchor"></a>
<a title="NodeRepresentable Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
NodeRepresentable Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>NodeRepresentable</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">NodeRepresentable</span></code></pre>
</div>
</div>
<p>Type is representable as <code><a href="../Enums/Node.html">Node</a></code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L36-L39">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams17NodeRepresentableP11representedAA0B0OyKF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams17NodeRepresentableP11representedAA0B0OyKF">represented()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html">Node</a></code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L38">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,442 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ScalarConstructible Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/ScalarConstructible" class="dashAnchor"></a>
<a title="ScalarConstructible Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
ScalarConstructible Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>ScalarConstructible</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ScalarConstructible</span></code></pre>
</div>
</div>
<p>Types conforming to this protocol can be extracted <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code>s.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L106-L116">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams19ScalarConstructibleP9construct4fromxSgAA4NodeO0B0V_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams19ScalarConstructibleP9construct4fromxSgAA4NodeO0B0V_tFZ">construct(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Construct an instance of <code>Self</code>, if possible, from the specified scalar.</p>
<div class="aside aside-note">
<p class="aside-title">Note</p>
<p>We use static constructors to avoid overloading <code>init?(_ scalar: Node.Scalar)</code> which would
cause callsite ambiguities when using <code>init</code> as closure.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type <code>Self</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>Self</code>, if one was successfully extracted from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L115">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Available%20where%20%60Self%60%3A%20%60FloatingPoint%60%20%26%20%60SexagesimalConvertible%60"></a>
<a name="//apple_ref/swift/Section/Available where `Self`: `FloatingPoint` &amp; `SexagesimalConvertible`" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60FloatingPoint%60%20%26%20%60SexagesimalConvertible%60"></a>
<h3 class="section-name"><span>Available where <code>Self</code>: <code>FloatingPoint</code> &amp; <code><a href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a></code></span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams19ScalarConstructiblePAASFRzAA22SexagesimalConvertibleRzrlE9construct4fromxSgAA4NodeO0B0V_tFZ"></a>
<a name="//apple_ref/swift/Method/construct(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams19ScalarConstructiblePAASFRzAA22SexagesimalConvertibleRzrlE9construct4fromxSgAA4NodeO0B0V_tFZ">construct(from:<wbr>)</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
<p>Construct an instance of <code>FloatingPoint &amp; SexagesimalConvertible</code>, if possible, from the specified
scalar.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">construct</span><span class="p">(</span><span class="n">from</span> <span class="nv">scalar</span><span class="p">:</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>scalar</em>
</code>
</td>
<td>
<div>
<p>The <code><a href="../Enums/Node/Scalar.html">Node.Scalar</a></code> from which to extract a value of type
<code>FloatingPoint &amp; SexagesimalConvertible</code>, if possible.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An instance of <code>FloatingPoint &amp; SexagesimalConvertible</code>, if one was successfully extracted
from the scalar.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L250-L269">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,345 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ScalarRepresentable Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/ScalarRepresentable" class="dashAnchor"></a>
<a title="ScalarRepresentable Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
ScalarRepresentable Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>ScalarRepresentable</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ScalarRepresentable</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/NodeRepresentable.html">NodeRepresentable</a></span></code></pre>
</div>
</div>
<p>Type is representable as <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L75-L78">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams19ScalarRepresentableP11representedAA4NodeO0B0VyF"></a>
<a name="//apple_ref/swift/Method/represented()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams19ScalarRepresentableP11representedAA4NodeO0B0VyF">represented()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>This value&rsquo;s <code><a href="../Enums/Node.html#/s:4Yams4NodeO6scalarAC6ScalarVSgvp">Node.scalar</a></code> representation.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
<p>This value&rsquo;s <code>Node.scalar</code> representation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">represented</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span><span class="o">.</span><span class="kt">Scalar</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L77">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,636 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SexagesimalConvertible Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/SexagesimalConvertible" class="dashAnchor"></a>
<a title="SexagesimalConvertible Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
SexagesimalConvertible Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>SexagesimalConvertible</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SexagesimalConvertible</span> <span class="p">:</span> <span class="kt">ExpressibleByIntegerLiteral</span></code></pre>
</div>
</div>
<p>Confirming types are convertible to base 60 numeric values.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L503-L526">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams22SexagesimalConvertibleP6create4fromxSgSS_tFZ"></a>
<a name="//apple_ref/swift/Method/create(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams22SexagesimalConvertibleP6create4fromxSgSS_tFZ">create(from:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a sexagesimal numeric value from the given string.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">static</span> <span class="kd">func</span> <span class="nf">create</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>string</em>
</code>
</td>
<td>
<div>
<p>The string from which to parse a sexagesimal value.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>A sexagesimal numeric value, if one was successfully parsed.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L509">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams22SexagesimalConvertibleP1moiyxx_xtFZ"></a>
<a name="//apple_ref/swift/Method/*(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams22SexagesimalConvertibleP1moiyxx_xtFZ">*(_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Multiplies two sexagesimal numeric values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">static</span> <span class="kd">func</span> <span class="o">*</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="k">Self</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="k">Self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>lhs</em>
</code>
</td>
<td>
<div>
<p>Left hand side multiplier.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>rhs</em>
</code>
</td>
<td>
<div>
<p>Right hand side multiplier.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The result of the multiplication.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L517">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Yams22SexagesimalConvertibleP1poiyxx_xtFZ"></a>
<a name="//apple_ref/swift/Method/+(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams22SexagesimalConvertibleP1poiyxx_xtFZ">+(_:<wbr>_:<wbr>)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Adds two sexagesimal numeric values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">static</span> <span class="kd">func</span> <span class="o">+</span> <span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="k">Self</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="k">Self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>lhs</em>
</code>
</td>
<td>
<div>
<p>Left hand side adder.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>rhs</em>
</code>
</td>
<td>
<div>
<p>Right hand side adder.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The result of the addition.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L525">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Available%20where%20%60Self%60%3A%20%60LosslessStringConvertible%60"></a>
<a name="//apple_ref/swift/Section/Available where `Self`: `LosslessStringConvertible`" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60LosslessStringConvertible%60"></a>
<h3 class="section-name"><span>Available where <code>Self</code>: <code>LosslessStringConvertible</code></span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams22SexagesimalConvertiblePAAs014LosslessStringC0RzrlE6create4fromxSgSS_tFZ"></a>
<a name="//apple_ref/swift/Method/create(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams22SexagesimalConvertiblePAAs014LosslessStringC0RzrlE6create4fromxSgSS_tFZ">create(from:<wbr>)</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
<p>Creates a sexagesimal numeric value from the given string.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">create</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>string</em>
</code>
</td>
<td>
<div>
<p>The string from which to parse a sexagesimal value.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>A sexagesimal numeric value, if one was successfully parsed.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L542-L544">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Available%20where%20%60Self%60%3A%20%60FixedWidthInteger%60"></a>
<a name="//apple_ref/swift/Section/Available where `Self`: `FixedWidthInteger`" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60FixedWidthInteger%60"></a>
<h3 class="section-name"><span>Available where <code>Self</code>: <code>FixedWidthInteger</code></span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams22SexagesimalConvertiblePAAs17FixedWidthIntegerRzrlE6create4fromxSgSS_tFZ"></a>
<a name="//apple_ref/swift/Method/create(from:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams22SexagesimalConvertiblePAAs17FixedWidthIntegerRzrlE6create4fromxSgSS_tFZ">create(from:<wbr>)</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
<p>Creates a sexagesimal numeric value from the given string.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">create</span><span class="p">(</span><span class="n">from</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="p">?</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>string</em>
</code>
</td>
<td>
<div>
<p>The string from which to parse a sexagesimal value.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>A sexagesimal numeric value, if one was successfully parsed.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Constructor.swift#L555-L557">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

View File

@ -0,0 +1,387 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>YAMLEncodable Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset="utf-8">
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../js/lunr.min.js" defer></script>
<script src="../js/typeahead.jquery.js" defer></script>
<script src="../js/jazzy.search.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Protocol/YAMLEncodable" class="dashAnchor"></a>
<a title="YAMLEncodable Protocol Reference"></a>
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
Yams 5.0.5 Docs
</a>
(100% documented)
</p>
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</div>
<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/jpsim/Yams">
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>
<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fjpsim.com%2FYams%2Fdocsets%2FYams.xml">
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>
<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">Yams Reference</a>
<img class="carat" src="../img/carat.png" alt=""/>
YAMLEncodable Protocol Reference
</p>
<div class="content-wrapper">
<nav class="navigation">
<ul class="nav-groups">
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Constructor.html">Constructor</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter.html">Emitter</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/LineBreak.html"> LineBreak</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Emitter/Options.html"> Options</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser.html">Parser</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Parser/Encoding.html"> Encoding</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver.html">Resolver</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Resolver/Rule.html"> Rule</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag.html">Tag</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/Tag/Name.html"> Name</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLDecoder.html">YAMLDecoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Classes/YAMLEncoder.html">YAMLEncoder</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node.html">Node</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Mapping.html"> Mapping</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Scalar.html"> Scalar</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/Node/Sequence.html"> Sequence</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError.html">YamlError</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Enums/YamlError/Context.html"> Context</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Array.html">Array</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/BinaryInteger.html">BinaryInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Bool.html">Bool</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Date.html">Date</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decimal.html">Decimal</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Decoder.html">Decoder</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Dictionary.html">Dictionary</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Double.html">Double</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/FixedWidthInteger.html">FixedWidthInteger</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Float.html">Float</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int.html">Int</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int16V">Int16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5Int32V">Int32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Int64.html">Int64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s4Int8V">Int8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/NSNull.html">NSNull</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Optional.html">Optional</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/Set.html">Set</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/String.html">String</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt.html">UInt</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt16V">UInt16</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s6UInt32V">UInt32</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UInt64.html">UInt64</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions.html#/s:s5UInt8V">UInt8</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Extensions/UUID.html">UUID</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams7compose4yaml___AA4NodeOSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams11compose_all4yaml___AA12YamlSequenceVyAA4NodeOGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">compose_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump6object9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSypSg_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAX7MappingVA_OtKF">dump(object:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4dump7objects9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzlF">dump(objects:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams4load4yaml___ypSgSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams8load_all4yaml___AA12YamlSequenceVyypGSS_AA8ResolverCAA11ConstructorCAA6ParserC8EncodingOtKF">load_all(yaml:_:_:_:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize4node9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSAA4NodeO_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAP8SequenceV0R0OAP7MappingVAZOtKF">serialize(node:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Functions.html#/s:4Yams9serialize5nodes9canonical6indent5width12allowUnicode9lineBreak13explicitStart0K3End7version8sortKeys13sequenceStyle07mappingR0SSx_SbS2iSbAA7EmitterC04LineJ0OS2bSi5major_Si5minortSgSbAA4NodeO8SequenceV0R0OAW7MappingVAZOtKSTRzAW7ElementRtzlF">serialize(nodes:canonical:indent:width:allowUnicode:lineBreak:explicitStart:explicitEnd:version:sortKeys:sequenceStyle:mappingStyle:)</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/NodeRepresentable.html">NodeRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarConstructible.html">ScalarConstructible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/SexagesimalConvertible.html">SexagesimalConvertible</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Protocols/YAMLEncodable.html">YAMLEncodable</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/Mark.html">Mark</a>
</li>
<li class="nav-group-task">
<a class="nav-group-task-link" href="../Structs/YamlSequence.html">YamlSequence</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section class="section">
<div class="section-content top-matter">
<h1>YAMLEncodable</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">YAMLEncodable</span> <span class="p">:</span> <span class="kt">Encodable</span></code></pre>
</div>
</div>
<p>Types conforming to this protocol can be encoded by <code>YamlEncoder</code>.</p>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L267-L270">Show on GitHub</a>
</div>
</div>
</section>
<section class="section">
<div class="section-content">
<div class="task-group">
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams13YAMLEncodableP3boxAA4NodeOyF"></a>
<a name="//apple_ref/swift/Method/box()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams13YAMLEncodableP3boxAA4NodeOyF">box()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns this value wrapped in a <code><a href="../Enums/Node.html">Node</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">box</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L269">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Available%20where%20%60Self%60%3A%20%60ScalarRepresentable%60"></a>
<a name="//apple_ref/swift/Section/Available where `Self`: `ScalarRepresentable`" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60ScalarRepresentable%60"></a>
<h3 class="section-name"><span>Available where <code>Self</code>: <code><a href="../Protocols/ScalarRepresentable.html">ScalarRepresentable</a></code></span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:4Yams13YAMLEncodablePA2A19ScalarRepresentableRzrlE3boxAA4NodeOyF"></a>
<a name="//apple_ref/swift/Method/box()" class="dashAnchor"></a>
<a class="token" href="#/s:4Yams13YAMLEncodablePA2A19ScalarRepresentableRzrlE3boxAA4NodeOyF">box()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
<p>Returns this value wrapped in a <code>Node.scalar</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">box</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/Node.html">Node</a></span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/jpsim/Yams/tree/main/Sources/Yams/Representer.swift#L274-L276">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class="footer">
<p>© 2018 <a class="link" href="https://jpsim.com" target="_blank" rel="external noopener">JP Simard</a> under MIT.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</html>

205
README.md
View File

@ -1,205 +0,0 @@
# Yams
![Yams](https://raw.githubusercontent.com/jpsim/Yams/main/yams.jpg)
A sweet and swifty [YAML](http://yaml.org/) parser built on
[LibYAML](https://github.com/yaml/libyaml).
[![SwiftPM](https://github.com/jpsim/Yams/workflows/SwiftPM/badge.svg)](https://github.com/jpsim/Yams/actions?query=workflow%3ASwiftPM)
[![xcodebuild](https://github.com/jpsim/Yams/workflows/xcodebuild/badge.svg)](https://github.com/jpsim/Yams/actions?query=workflow%3Axcodebuild)
[![pod lib lint](https://github.com/jpsim/Yams/workflows/pod%20lib%20lint/badge.svg)](https://github.com/jpsim/Yams/actions?query=workflow%3A%22pod+lib+lint%22)
[![Nightly](https://github.com/jpsim/Yams/workflows/Nightly/badge.svg)](https://github.com/jpsim/Yams/actions?query=workflow%3ANightly)
[![codecov](https://codecov.io/gh/jpsim/Yams/branch/main/graph/badge.svg)](https://codecov.io/gh/jpsim/Yams)
## Installation
Building Yams requires Xcode 12.5+ or a Swift 5.4+ toolchain with the
Swift Package Manager or CMake and Ninja.
### CMake
CMake 3.17.2 or newer is required, along with Ninja 1.9.0 or newer.
When building for non-Apple platforms:
```
cmake -B /path/to/build -G Ninja -S /path/to/yams -DCMAKE_BUILD_TYPE=Release -DFoundation_DIR=/path/to/foundation/build/cmake/modules
cmake --build /path/to/build
```
To build for Apple platforms (macOS, iOS, tvOS, watchOS), there is no
need to spearately build Foundation because it is included as part of
the SDK:
```
cmake -B /path/to/build -G Ninja -S /path/to/yams -DCMAKE_BUILD_TYPE=Release
cmake --build /path/to/build
```
### Swift Package Manager
Add `.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.5")` to your
`Package.swift` file's `dependencies`.
### CocoaPods
Add `pod 'Yams'` to your `Podfile`.
### Carthage
Add `github "jpsim/Yams"` to your `Cartfile`.
### Bazel
In your WORKSPACE file
```WORKSPACE
YAMS_GIT_SHA = "SOME_SHA"
http_archive(
name = "com_github_jpsim_yams",
urls = [
"https://github.com/jpsim/Yams/archive/%s.zip" % YAMS_GIT_SHA,
],
strip_prefix = "Yams-%s" % YAMS_GIT_SHA,
)
```
## Usage
Yams has three groups of conversion APIs:
one for use with [`Codable` types](#codable-types),
another for [Swift Standard Library types](#swift-standard-library-types),
and a third one for a [Yams-native](#yamsnode) representation.
#### `Codable` types
- Codable is an [encoding & decoding strategy introduced in Swift 4][Codable]
enabling easy conversion between YAML and other Encoders like
[JSONEncoder][JSONEncoder] and [PropertyListEncoder][PropertyListEncoder].
- Lowest computational overhead, equivalent to `Yams.Node`.
- **Encoding: `YAMLEncoder.encode(_:)`**
Produces a YAML `String` from an instance of type conforming to `Encodable`.
- **Decoding: `YAMLDecoder.decode(_:from:)`**
Decodes an instance of type conforming to `Decodable` from YAML `String` or
`Data`.
```swift
import Foundation
import Yams
struct S: Codable {
var p: String
}
let s = S(p: "test")
let encoder = YAMLEncoder()
let encodedYAML = try encoder.encode(s)
encodedYAML == """
p: test
"""
let decoder = YAMLDecoder()
let decoded = try decoder.decode(S.self, from: encodedYAML)
s.p == decoded.p
```
#### Swift Standard Library types
- The type of Swift Standard Library is inferred from the contents of the
internal `Yams.Node` representation by matching regular expressions.
- This method has the largest computational overhead When decoding YAML, because
the type inference of all objects is done up-front.
- It may be easier to use in such a way as to handle objects created from
`JSONSerialization` or if the input is already standard library types
(`Any`, `Dictionary`, `Array`, etc.).
- **Encoding: `Yams.dump(object:)`**
Produces a YAML `String` from an instance of Swift Standard Library types.
- **Decoding: `Yams.load(yaml:)`**
Produces an instance of Swift Standard Library types as `Any` from YAML
`String`.
```swift
// [String: Any]
let dictionary: [String: Any] = ["key": "value"]
let mapYAML: String = try Yams.dump(object: dictionary)
mapYAML == """
key: value
"""
let loadedDictionary = try Yams.load(yaml: mapYAML) as? [String: Any]
// [Any]
let array: [Int] = [1, 2, 3]
let sequenceYAML: String = try Yams.dump(object: array)
sequenceYAML == """
- 1
- 2
- 3
"""
let loadedArray: [Int]? = try Yams.load(yaml: sequenceYAML) as? [Int]
// Any
let string = "string"
let scalarYAML: String = try Yams.dump(object: string)
scalarYAML == """
string
"""
let loadedString: String? = try Yams.load(yaml: scalarYAML) as? String
```
#### `Yams.Node`
- Yams' native model representing [Nodes of YAML][Nodes Spec] which provides all
functions such as detection and customization of the YAML format.
- Depending on how it is used, computational overhead can be minimized.
- **Encoding: `Yams.serialize(node:)`**
Produces a YAML `String` from an instance of `Node`.
- **Decoding `Yams.compose(yaml:)`**
Produces an instance of `Node` from YAML `String`.
```swift
var map: Yams.Node = [
"array": [
1, 2, 3
]
]
map.mapping?.style = .flow
map["array"]?.sequence?.style = .flow
let yaml = try Yams.serialize(node: map)
yaml == """
{array: [1, 2, 3]}
"""
let node = try Yams.compose(yaml: yaml)
map == node
```
#### Integrating with [Combine](https://developer.apple.com/documentation/combine)
When Apple's Combine framework is available, `YAMLDecoder` conforms to the
`TopLevelDecoder` protocol, which allows it to be used with the
`decode(type:decoder:)` operator:
```swift
import Combine
import Foundation
import Yams
func fetchBook(from url: URL) -> AnyPublisher<Book, Error> {
URLSession.shared.dataTaskPublisher(for: url)
.map(\.data)
.decode(type: Book.self, decoder: YAMLDecoder())
.eraseToAnyPublisher()
}
```
## License
Both Yams and libYAML are MIT licensed.
[Codable]: https://developer.apple.com/documentation/foundation/archives_and_serialization/encoding_and_decoding_custom_types
[JSONEncoder]: https://developer.apple.com/documentation/foundation/jsonencoder
[PropertyListEncoder]: https://developer.apple.com/documentation/foundation/propertylistencoder
[Nodes Spec]: http://www.yaml.org/spec/1.2/spec.html#id2764044

View File

@ -1,2 +0,0 @@
add_subdirectory(CYaml)
add_subdirectory(Yams)

View File

@ -1,18 +0,0 @@
add_library(CYaml STATIC
src/api.c
src/emitter.c
src/parser.c
src/reader.c
src/scanner.c
src/writer.c)
target_compile_definitions(CYaml PUBLIC
$<$<COMPILE_LANGUAGE:C>:YAML_DECLARE_STATIC>)
target_include_directories(CYaml PUBLIC
$<$<COMPILE_LANGUAGE:C>:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_compile_options(CYaml PUBLIC
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -DYAML_DECLARE_STATIC>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -I${CMAKE_CURRENT_SOURCE_DIR}/include>")
set_property(TARGET CYaml PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(GLOBAL APPEND PROPERTY YAMS_EXPORTS CYaml)

View File

@ -1 +0,0 @@
#include "yaml.h"

View File

@ -1,3 +0,0 @@
module CYaml {
header "yaml.h"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,469 +0,0 @@
#include "yaml_private.h"
/*
* Declarations.
*/
static int
yaml_parser_set_reader_error(yaml_parser_t *parser, const char *problem,
size_t offset, int value);
static int
yaml_parser_update_raw_buffer(yaml_parser_t *parser);
static int
yaml_parser_determine_encoding(yaml_parser_t *parser);
YAML_DECLARE(int)
yaml_parser_update_buffer(yaml_parser_t *parser, size_t length);
/*
* Set the reader error and return 0.
*/
static int
yaml_parser_set_reader_error(yaml_parser_t *parser, const char *problem,
size_t offset, int value)
{
parser->error = YAML_READER_ERROR;
parser->problem = problem;
parser->problem_offset = offset;
parser->problem_value = value;
return 0;
}
/*
* Byte order marks.
*/
#define BOM_UTF8 "\xef\xbb\xbf"
#define BOM_UTF16LE "\xff\xfe"
#define BOM_UTF16BE "\xfe\xff"
/*
* Determine the input stream encoding by checking the BOM symbol. If no BOM is
* found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure.
*/
static int
yaml_parser_determine_encoding(yaml_parser_t *parser)
{
/* Ensure that we had enough bytes in the raw buffer. */
while (!parser->eof
&& parser->raw_buffer.last - parser->raw_buffer.pointer < 3) {
if (!yaml_parser_update_raw_buffer(parser)) {
return 0;
}
}
/* Determine the encoding. */
if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 2
&& !memcmp(parser->raw_buffer.pointer, BOM_UTF16LE, 2)) {
parser->encoding = YAML_UTF16LE_ENCODING;
parser->raw_buffer.pointer += 2;
parser->offset += 2;
}
else if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 2
&& !memcmp(parser->raw_buffer.pointer, BOM_UTF16BE, 2)) {
parser->encoding = YAML_UTF16BE_ENCODING;
parser->raw_buffer.pointer += 2;
parser->offset += 2;
}
else if (parser->raw_buffer.last - parser->raw_buffer.pointer >= 3
&& !memcmp(parser->raw_buffer.pointer, BOM_UTF8, 3)) {
parser->encoding = YAML_UTF8_ENCODING;
parser->raw_buffer.pointer += 3;
parser->offset += 3;
}
else {
parser->encoding = YAML_UTF8_ENCODING;
}
return 1;
}
/*
* Update the raw buffer.
*/
static int
yaml_parser_update_raw_buffer(yaml_parser_t *parser)
{
size_t size_read = 0;
/* Return if the raw buffer is full. */
if (parser->raw_buffer.start == parser->raw_buffer.pointer
&& parser->raw_buffer.last == parser->raw_buffer.end)
return 1;
/* Return on EOF. */
if (parser->eof) return 1;
/* Move the remaining bytes in the raw buffer to the beginning. */
if (parser->raw_buffer.start < parser->raw_buffer.pointer
&& parser->raw_buffer.pointer < parser->raw_buffer.last) {
memmove(parser->raw_buffer.start, parser->raw_buffer.pointer,
parser->raw_buffer.last - parser->raw_buffer.pointer);
}
parser->raw_buffer.last -=
parser->raw_buffer.pointer - parser->raw_buffer.start;
parser->raw_buffer.pointer = parser->raw_buffer.start;
/* Call the read handler to fill the buffer. */
if (!parser->read_handler(parser->read_handler_data, parser->raw_buffer.last,
parser->raw_buffer.end - parser->raw_buffer.last, &size_read)) {
return yaml_parser_set_reader_error(parser, "input error",
parser->offset, -1);
}
parser->raw_buffer.last += size_read;
if (!size_read) {
parser->eof = 1;
}
return 1;
}
/*
* Ensure that the buffer contains at least `length` characters.
* Return 1 on success, 0 on failure.
*
* The length is supposed to be significantly less that the buffer size.
*/
YAML_DECLARE(int)
yaml_parser_update_buffer(yaml_parser_t *parser, size_t length)
{
int first = 1;
assert(parser->read_handler); /* Read handler must be set. */
/* If the EOF flag is set and the raw buffer is empty, do nothing. */
if (parser->eof && parser->raw_buffer.pointer == parser->raw_buffer.last)
return 1;
/* Return if the buffer contains enough characters. */
if (parser->unread >= length)
return 1;
/* Determine the input encoding if it is not known yet. */
if (!parser->encoding) {
if (!yaml_parser_determine_encoding(parser))
return 0;
}
/* Move the unread characters to the beginning of the buffer. */
if (parser->buffer.start < parser->buffer.pointer
&& parser->buffer.pointer < parser->buffer.last) {
size_t size = parser->buffer.last - parser->buffer.pointer;
memmove(parser->buffer.start, parser->buffer.pointer, size);
parser->buffer.pointer = parser->buffer.start;
parser->buffer.last = parser->buffer.start + size;
}
else if (parser->buffer.pointer == parser->buffer.last) {
parser->buffer.pointer = parser->buffer.start;
parser->buffer.last = parser->buffer.start;
}
/* Fill the buffer until it has enough characters. */
while (parser->unread < length)
{
/* Fill the raw buffer if necessary. */
if (!first || parser->raw_buffer.pointer == parser->raw_buffer.last) {
if (!yaml_parser_update_raw_buffer(parser)) return 0;
}
first = 0;
/* Decode the raw buffer. */
while (parser->raw_buffer.pointer != parser->raw_buffer.last)
{
unsigned int value = 0, value2 = 0;
int incomplete = 0;
unsigned char octet;
unsigned int width = 0;
int low, high;
size_t k;
size_t raw_unread = parser->raw_buffer.last - parser->raw_buffer.pointer;
/* Decode the next character. */
switch (parser->encoding)
{
case YAML_UTF8_ENCODING:
/*
* Decode a UTF-8 character. Check RFC 3629
* (http://www.ietf.org/rfc/rfc3629.txt) for more details.
*
* The following table (taken from the RFC) is used for
* decoding.
*
* Char. number range | UTF-8 octet sequence
* (hexadecimal) | (binary)
* --------------------+------------------------------------
* 0000 0000-0000 007F | 0xxxxxxx
* 0000 0080-0000 07FF | 110xxxxx 10xxxxxx
* 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
* 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
*
* Additionally, the characters in the range 0xD800-0xDFFF
* are prohibited as they are reserved for use with UTF-16
* surrogate pairs.
*/
/* Determine the length of the UTF-8 sequence. */
octet = parser->raw_buffer.pointer[0];
width = (octet & 0x80) == 0x00 ? 1 :
(octet & 0xE0) == 0xC0 ? 2 :
(octet & 0xF0) == 0xE0 ? 3 :
(octet & 0xF8) == 0xF0 ? 4 : 0;
/* Check if the leading octet is valid. */
if (!width)
return yaml_parser_set_reader_error(parser,
"invalid leading UTF-8 octet",
parser->offset, octet);
/* Check if the raw buffer contains an incomplete character. */
if (width > raw_unread) {
if (parser->eof) {
return yaml_parser_set_reader_error(parser,
"incomplete UTF-8 octet sequence",
parser->offset, -1);
}
incomplete = 1;
break;
}
/* Decode the leading octet. */
value = (octet & 0x80) == 0x00 ? octet & 0x7F :
(octet & 0xE0) == 0xC0 ? octet & 0x1F :
(octet & 0xF0) == 0xE0 ? octet & 0x0F :
(octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
/* Check and decode the trailing octets. */
for (k = 1; k < width; k ++)
{
octet = parser->raw_buffer.pointer[k];
/* Check if the octet is valid. */
if ((octet & 0xC0) != 0x80)
return yaml_parser_set_reader_error(parser,
"invalid trailing UTF-8 octet",
parser->offset+k, octet);
/* Decode the octet. */
value = (value << 6) + (octet & 0x3F);
}
/* Check the length of the sequence against the value. */
if (!((width == 1) ||
(width == 2 && value >= 0x80) ||
(width == 3 && value >= 0x800) ||
(width == 4 && value >= 0x10000)))
return yaml_parser_set_reader_error(parser,
"invalid length of a UTF-8 sequence",
parser->offset, -1);
/* Check the range of the value. */
if ((value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF)
return yaml_parser_set_reader_error(parser,
"invalid Unicode character",
parser->offset, value);
break;
case YAML_UTF16LE_ENCODING:
case YAML_UTF16BE_ENCODING:
low = (parser->encoding == YAML_UTF16LE_ENCODING ? 0 : 1);
high = (parser->encoding == YAML_UTF16LE_ENCODING ? 1 : 0);
/*
* The UTF-16 encoding is not as simple as one might
* naively think. Check RFC 2781
* (http://www.ietf.org/rfc/rfc2781.txt).
*
* Normally, two subsequent bytes describe a Unicode
* character. However a special technique (called a
* surrogate pair) is used for specifying character
* values larger than 0xFFFF.
*
* A surrogate pair consists of two pseudo-characters:
* high surrogate area (0xD800-0xDBFF)
* low surrogate area (0xDC00-0xDFFF)
*
* The following formulas are used for decoding
* and encoding characters using surrogate pairs:
*
* U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF)
* U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF)
* W1 = 110110yyyyyyyyyy
* W2 = 110111xxxxxxxxxx
*
* where U is the character value, W1 is the high surrogate
* area, W2 is the low surrogate area.
*/
/* Check for incomplete UTF-16 character. */
if (raw_unread < 2) {
if (parser->eof) {
return yaml_parser_set_reader_error(parser,
"incomplete UTF-16 character",
parser->offset, -1);
}
incomplete = 1;
break;
}
/* Get the character. */
value = parser->raw_buffer.pointer[low]
+ (parser->raw_buffer.pointer[high] << 8);
/* Check for unexpected low surrogate area. */
if ((value & 0xFC00) == 0xDC00)
return yaml_parser_set_reader_error(parser,
"unexpected low surrogate area",
parser->offset, value);
/* Check for a high surrogate area. */
if ((value & 0xFC00) == 0xD800) {
width = 4;
/* Check for incomplete surrogate pair. */
if (raw_unread < 4) {
if (parser->eof) {
return yaml_parser_set_reader_error(parser,
"incomplete UTF-16 surrogate pair",
parser->offset, -1);
}
incomplete = 1;
break;
}
/* Get the next character. */
value2 = parser->raw_buffer.pointer[low+2]
+ (parser->raw_buffer.pointer[high+2] << 8);
/* Check for a low surrogate area. */
if ((value2 & 0xFC00) != 0xDC00)
return yaml_parser_set_reader_error(parser,
"expected low surrogate area",
parser->offset+2, value2);
/* Generate the value of the surrogate pair. */
value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF);
}
else {
width = 2;
}
break;
default:
assert(1); /* Impossible. */
}
/* Check if the raw buffer contains enough bytes to form a character. */
if (incomplete) break;
/*
* Check if the character is in the allowed range:
* #x9 | #xA | #xD | [#x20-#x7E] (8 bit)
* | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit)
* | [#x10000-#x10FFFF] (32 bit)
*/
if (! (value == 0x09 || value == 0x0A || value == 0x0D
|| (value >= 0x20 && value <= 0x7E)
|| (value == 0x85) || (value >= 0xA0 && value <= 0xD7FF)
|| (value >= 0xE000 && value <= 0xFFFD)
|| (value >= 0x10000 && value <= 0x10FFFF)))
return yaml_parser_set_reader_error(parser,
"control characters are not allowed",
parser->offset, value);
/* Move the raw pointers. */
parser->raw_buffer.pointer += width;
parser->offset += width;
/* Finally put the character into the buffer. */
/* 0000 0000-0000 007F -> 0xxxxxxx */
if (value <= 0x7F) {
*(parser->buffer.last++) = value;
}
/* 0000 0080-0000 07FF -> 110xxxxx 10xxxxxx */
else if (value <= 0x7FF) {
*(parser->buffer.last++) = 0xC0 + (value >> 6);
*(parser->buffer.last++) = 0x80 + (value & 0x3F);
}
/* 0000 0800-0000 FFFF -> 1110xxxx 10xxxxxx 10xxxxxx */
else if (value <= 0xFFFF) {
*(parser->buffer.last++) = 0xE0 + (value >> 12);
*(parser->buffer.last++) = 0x80 + ((value >> 6) & 0x3F);
*(parser->buffer.last++) = 0x80 + (value & 0x3F);
}
/* 0001 0000-0010 FFFF -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
else {
*(parser->buffer.last++) = 0xF0 + (value >> 18);
*(parser->buffer.last++) = 0x80 + ((value >> 12) & 0x3F);
*(parser->buffer.last++) = 0x80 + ((value >> 6) & 0x3F);
*(parser->buffer.last++) = 0x80 + (value & 0x3F);
}
parser->unread ++;
}
/* On EOF, put NUL into the buffer and return. */
if (parser->eof) {
*(parser->buffer.last++) = '\0';
parser->unread ++;
return 1;
}
}
if (parser->offset >= MAX_FILE_SIZE) {
return yaml_parser_set_reader_error(parser, "input is too long",
parser->offset, -1);
}
return 1;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,141 +0,0 @@
#include "yaml_private.h"
/*
* Declarations.
*/
static int
yaml_emitter_set_writer_error(yaml_emitter_t *emitter, const char *problem);
YAML_DECLARE(int)
yaml_emitter_flush(yaml_emitter_t *emitter);
/*
* Set the writer error and return 0.
*/
static int
yaml_emitter_set_writer_error(yaml_emitter_t *emitter, const char *problem)
{
emitter->error = YAML_WRITER_ERROR;
emitter->problem = problem;
return 0;
}
/*
* Flush the output buffer.
*/
YAML_DECLARE(int)
yaml_emitter_flush(yaml_emitter_t *emitter)
{
int low, high;
assert(emitter); /* Non-NULL emitter object is expected. */
assert(emitter->write_handler); /* Write handler must be set. */
assert(emitter->encoding); /* Output encoding must be set. */
emitter->buffer.last = emitter->buffer.pointer;
emitter->buffer.pointer = emitter->buffer.start;
/* Check if the buffer is empty. */
if (emitter->buffer.start == emitter->buffer.last) {
return 1;
}
/* If the output encoding is UTF-8, we don't need to recode the buffer. */
if (emitter->encoding == YAML_UTF8_ENCODING)
{
if (emitter->write_handler(emitter->write_handler_data,
emitter->buffer.start,
emitter->buffer.last - emitter->buffer.start)) {
emitter->buffer.last = emitter->buffer.start;
emitter->buffer.pointer = emitter->buffer.start;
return 1;
}
else {
return yaml_emitter_set_writer_error(emitter, "write error");
}
}
/* Recode the buffer into the raw buffer. */
low = (emitter->encoding == YAML_UTF16LE_ENCODING ? 0 : 1);
high = (emitter->encoding == YAML_UTF16LE_ENCODING ? 1 : 0);
while (emitter->buffer.pointer != emitter->buffer.last)
{
unsigned char octet;
unsigned int width;
unsigned int value;
size_t k;
/*
* See the "reader.c" code for more details on UTF-8 encoding. Note
* that we assume that the buffer contains a valid UTF-8 sequence.
*/
/* Read the next UTF-8 character. */
octet = emitter->buffer.pointer[0];
width = (octet & 0x80) == 0x00 ? 1 :
(octet & 0xE0) == 0xC0 ? 2 :
(octet & 0xF0) == 0xE0 ? 3 :
(octet & 0xF8) == 0xF0 ? 4 : 0;
value = (octet & 0x80) == 0x00 ? octet & 0x7F :
(octet & 0xE0) == 0xC0 ? octet & 0x1F :
(octet & 0xF0) == 0xE0 ? octet & 0x0F :
(octet & 0xF8) == 0xF0 ? octet & 0x07 : 0;
for (k = 1; k < width; k ++) {
octet = emitter->buffer.pointer[k];
value = (value << 6) + (octet & 0x3F);
}
emitter->buffer.pointer += width;
/* Write the character. */
if (value < 0x10000)
{
emitter->raw_buffer.last[high] = value >> 8;
emitter->raw_buffer.last[low] = value & 0xFF;
emitter->raw_buffer.last += 2;
}
else
{
/* Write the character using a surrogate pair (check "reader.c"). */
value -= 0x10000;
emitter->raw_buffer.last[high] = 0xD8 + (value >> 18);
emitter->raw_buffer.last[low] = (value >> 10) & 0xFF;
emitter->raw_buffer.last[high+2] = 0xDC + ((value >> 8) & 0xFF);
emitter->raw_buffer.last[low+2] = value & 0xFF;
emitter->raw_buffer.last += 4;
}
}
/* Write the raw buffer. */
if (emitter->write_handler(emitter->write_handler_data,
emitter->raw_buffer.start,
emitter->raw_buffer.last - emitter->raw_buffer.start)) {
emitter->buffer.last = emitter->buffer.start;
emitter->buffer.pointer = emitter->buffer.start;
emitter->raw_buffer.last = emitter->raw_buffer.start;
emitter->raw_buffer.pointer = emitter->raw_buffer.start;
return 1;
}
else {
return yaml_emitter_set_writer_error(emitter, "write error");
}
}

View File

@ -1,680 +0,0 @@
#include "yaml.h"
#include <assert.h>
#include <limits.h>
#include <stddef.h>
/*
* Memory management.
*/
YAML_DECLARE(void *)
yaml_malloc(size_t size);
YAML_DECLARE(void *)
yaml_realloc(void *ptr, size_t size);
YAML_DECLARE(void)
yaml_free(void *ptr);
YAML_DECLARE(yaml_char_t *)
yaml_strdup(const yaml_char_t *);
/*
* Reader: Ensure that the buffer contains at least `length` characters.
*/
YAML_DECLARE(int)
yaml_parser_update_buffer(yaml_parser_t *parser, size_t length);
/*
* Scanner: Ensure that the token stack contains at least one token ready.
*/
YAML_DECLARE(int)
yaml_parser_fetch_more_tokens(yaml_parser_t *parser);
/*
* The size of the input raw buffer.
*/
#define INPUT_RAW_BUFFER_SIZE 16384
/*
* The size of the input buffer.
*
* It should be possible to decode the whole raw buffer.
*/
#define INPUT_BUFFER_SIZE (INPUT_RAW_BUFFER_SIZE*3)
/*
* The size of the output buffer.
*/
#define OUTPUT_BUFFER_SIZE 16384
/*
* The size of the output raw buffer.
*
* It should be possible to encode the whole output buffer.
*/
#define OUTPUT_RAW_BUFFER_SIZE (OUTPUT_BUFFER_SIZE*2+2)
/*
* The maximum size of a YAML input file.
* This used to be PTRDIFF_MAX, but that's not entirely portable
* because stdint.h isn't available on all platforms.
* It is not entirely clear why this isn't the maximum value
* that can fit into the parser->offset field.
*/
#define MAX_FILE_SIZE (~(size_t)0 / 2)
/*
* The size of other stacks and queues.
*/
#define INITIAL_STACK_SIZE 16
#define INITIAL_QUEUE_SIZE 16
#define INITIAL_STRING_SIZE 16
/*
* Buffer management.
*/
#define BUFFER_INIT(context,buffer,size) \
(((buffer).start = (yaml_char_t *)yaml_malloc(size)) ? \
((buffer).last = (buffer).pointer = (buffer).start, \
(buffer).end = (buffer).start+(size), \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define BUFFER_DEL(context,buffer) \
(yaml_free((buffer).start), \
(buffer).start = (buffer).pointer = (buffer).end = 0)
/*
* String management.
*/
typedef struct {
yaml_char_t *start;
yaml_char_t *end;
yaml_char_t *pointer;
} yaml_string_t;
YAML_DECLARE(int)
yaml_string_extend(yaml_char_t **start,
yaml_char_t **pointer, yaml_char_t **end);
YAML_DECLARE(int)
yaml_string_join(
yaml_char_t **a_start, yaml_char_t **a_pointer, yaml_char_t **a_end,
yaml_char_t **b_start, yaml_char_t **b_pointer, yaml_char_t **b_end);
#define NULL_STRING { NULL, NULL, NULL }
#define STRING(string,length) { (string), (string)+(length), (string) }
#define STRING_ASSIGN(value,string,length) \
((value).start = (string), \
(value).end = (string)+(length), \
(value).pointer = (string))
#define STRING_INIT(context,string,size) \
(((string).start = YAML_MALLOC(size)) ? \
((string).pointer = (string).start, \
(string).end = (string).start+(size), \
memset((string).start, 0, (size)), \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define STRING_DEL(context,string) \
(yaml_free((string).start), \
(string).start = (string).pointer = (string).end = 0)
#define STRING_EXTEND(context,string) \
((((string).pointer+5 < (string).end) \
|| yaml_string_extend(&(string).start, \
&(string).pointer, &(string).end)) ? \
1 : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define CLEAR(context,string) \
((string).pointer = (string).start, \
memset((string).start, 0, (string).end-(string).start))
#define JOIN(context,string_a,string_b) \
((yaml_string_join(&(string_a).start, &(string_a).pointer, \
&(string_a).end, &(string_b).start, \
&(string_b).pointer, &(string_b).end)) ? \
((string_b).pointer = (string_b).start, \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
/*
* String check operations.
*/
/*
* Check the octet at the specified position.
*/
#define CHECK_AT(string,octet,offset) \
((string).pointer[offset] == (yaml_char_t)(octet))
/*
* Check the current octet in the buffer.
*/
#define CHECK(string,octet) (CHECK_AT((string),(octet),0))
/*
* Check if the character at the specified position is an alphabetical
* character, a digit, '_', or '-'.
*/
#define IS_ALPHA_AT(string,offset) \
(((string).pointer[offset] >= (yaml_char_t) '0' && \
(string).pointer[offset] <= (yaml_char_t) '9') || \
((string).pointer[offset] >= (yaml_char_t) 'A' && \
(string).pointer[offset] <= (yaml_char_t) 'Z') || \
((string).pointer[offset] >= (yaml_char_t) 'a' && \
(string).pointer[offset] <= (yaml_char_t) 'z') || \
(string).pointer[offset] == '_' || \
(string).pointer[offset] == '-')
#define IS_ALPHA(string) IS_ALPHA_AT((string),0)
/*
* Check if the character at the specified position is a digit.
*/
#define IS_DIGIT_AT(string,offset) \
(((string).pointer[offset] >= (yaml_char_t) '0' && \
(string).pointer[offset] <= (yaml_char_t) '9'))
#define IS_DIGIT(string) IS_DIGIT_AT((string),0)
/*
* Get the value of a digit.
*/
#define AS_DIGIT_AT(string,offset) \
((string).pointer[offset] - (yaml_char_t) '0')
#define AS_DIGIT(string) AS_DIGIT_AT((string),0)
/*
* Check if the character at the specified position is a hex-digit.
*/
#define IS_HEX_AT(string,offset) \
(((string).pointer[offset] >= (yaml_char_t) '0' && \
(string).pointer[offset] <= (yaml_char_t) '9') || \
((string).pointer[offset] >= (yaml_char_t) 'A' && \
(string).pointer[offset] <= (yaml_char_t) 'F') || \
((string).pointer[offset] >= (yaml_char_t) 'a' && \
(string).pointer[offset] <= (yaml_char_t) 'f'))
#define IS_HEX(string) IS_HEX_AT((string),0)
/*
* Get the value of a hex-digit.
*/
#define AS_HEX_AT(string,offset) \
(((string).pointer[offset] >= (yaml_char_t) 'A' && \
(string).pointer[offset] <= (yaml_char_t) 'F') ? \
((string).pointer[offset] - (yaml_char_t) 'A' + 10) : \
((string).pointer[offset] >= (yaml_char_t) 'a' && \
(string).pointer[offset] <= (yaml_char_t) 'f') ? \
((string).pointer[offset] - (yaml_char_t) 'a' + 10) : \
((string).pointer[offset] - (yaml_char_t) '0'))
#define AS_HEX(string) AS_HEX_AT((string),0)
/*
* Check if the character is ASCII.
*/
#define IS_ASCII_AT(string,offset) \
((string).pointer[offset] <= (yaml_char_t) '\x7F')
#define IS_ASCII(string) IS_ASCII_AT((string),0)
/*
* Check if the character can be printed unescaped.
*/
#define IS_PRINTABLE_AT(string,offset) \
(((string).pointer[offset] == 0x0A) /* . == #x0A */ \
|| ((string).pointer[offset] >= 0x20 /* #x20 <= . <= #x7E */ \
&& (string).pointer[offset] <= 0x7E) \
|| ((string).pointer[offset] == 0xC2 /* #0xA0 <= . <= #xD7FF */ \
&& (string).pointer[offset+1] >= 0xA0) \
|| ((string).pointer[offset] > 0xC2 \
&& (string).pointer[offset] < 0xED) \
|| ((string).pointer[offset] == 0xED \
&& (string).pointer[offset+1] < 0xA0) \
|| ((string).pointer[offset] == 0xEE) \
|| ((string).pointer[offset] == 0xEF /* #xE000 <= . <= #xFFFD */ \
&& !((string).pointer[offset+1] == 0xBB /* && . != #xFEFF */ \
&& (string).pointer[offset+2] == 0xBF) \
&& !((string).pointer[offset+1] == 0xBF \
&& ((string).pointer[offset+2] == 0xBE \
|| (string).pointer[offset+2] == 0xBF))))
#define IS_PRINTABLE(string) IS_PRINTABLE_AT((string),0)
/*
* Check if the character at the specified position is NUL.
*/
#define IS_Z_AT(string,offset) CHECK_AT((string),'\0',(offset))
#define IS_Z(string) IS_Z_AT((string),0)
/*
* Check if the character at the specified position is BOM.
*/
#define IS_BOM_AT(string,offset) \
(CHECK_AT((string),'\xEF',(offset)) \
&& CHECK_AT((string),'\xBB',(offset)+1) \
&& CHECK_AT((string),'\xBF',(offset)+2)) /* BOM (#xFEFF) */
#define IS_BOM(string) IS_BOM_AT(string,0)
/*
* Check if the character at the specified position is space.
*/
#define IS_SPACE_AT(string,offset) CHECK_AT((string),' ',(offset))
#define IS_SPACE(string) IS_SPACE_AT((string),0)
/*
* Check if the character at the specified position is tab.
*/
#define IS_TAB_AT(string,offset) CHECK_AT((string),'\t',(offset))
#define IS_TAB(string) IS_TAB_AT((string),0)
/*
* Check if the character at the specified position is blank (space or tab).
*/
#define IS_BLANK_AT(string,offset) \
(IS_SPACE_AT((string),(offset)) || IS_TAB_AT((string),(offset)))
#define IS_BLANK(string) IS_BLANK_AT((string),0)
/*
* Check if the character at the specified position is a line break.
*/
#define IS_BREAK_AT(string,offset) \
(CHECK_AT((string),'\r',(offset)) /* CR (#xD)*/ \
|| CHECK_AT((string),'\n',(offset)) /* LF (#xA) */ \
|| (CHECK_AT((string),'\xC2',(offset)) \
&& CHECK_AT((string),'\x85',(offset)+1)) /* NEL (#x85) */ \
|| (CHECK_AT((string),'\xE2',(offset)) \
&& CHECK_AT((string),'\x80',(offset)+1) \
&& CHECK_AT((string),'\xA8',(offset)+2)) /* LS (#x2028) */ \
|| (CHECK_AT((string),'\xE2',(offset)) \
&& CHECK_AT((string),'\x80',(offset)+1) \
&& CHECK_AT((string),'\xA9',(offset)+2))) /* PS (#x2029) */
#define IS_BREAK(string) IS_BREAK_AT((string),0)
#define IS_CRLF_AT(string,offset) \
(CHECK_AT((string),'\r',(offset)) && CHECK_AT((string),'\n',(offset)+1))
#define IS_CRLF(string) IS_CRLF_AT((string),0)
/*
* Check if the character is a line break or NUL.
*/
#define IS_BREAKZ_AT(string,offset) \
(IS_BREAK_AT((string),(offset)) || IS_Z_AT((string),(offset)))
#define IS_BREAKZ(string) IS_BREAKZ_AT((string),0)
/*
* Check if the character is a line break, space, or NUL.
*/
#define IS_SPACEZ_AT(string,offset) \
(IS_SPACE_AT((string),(offset)) || IS_BREAKZ_AT((string),(offset)))
#define IS_SPACEZ(string) IS_SPACEZ_AT((string),0)
/*
* Check if the character is a line break, space, tab, or NUL.
*/
#define IS_BLANKZ_AT(string,offset) \
(IS_BLANK_AT((string),(offset)) || IS_BREAKZ_AT((string),(offset)))
#define IS_BLANKZ(string) IS_BLANKZ_AT((string),0)
/*
* Determine the width of the character.
*/
#define WIDTH_AT(string,offset) \
(((string).pointer[offset] & 0x80) == 0x00 ? 1 : \
((string).pointer[offset] & 0xE0) == 0xC0 ? 2 : \
((string).pointer[offset] & 0xF0) == 0xE0 ? 3 : \
((string).pointer[offset] & 0xF8) == 0xF0 ? 4 : 0)
#define WIDTH(string) WIDTH_AT((string),0)
/*
* Move the string pointer to the next character.
*/
#define MOVE(string) ((string).pointer += WIDTH((string)))
/*
* Copy a character and move the pointers of both strings.
*/
#define COPY(string_a,string_b) \
((*(string_b).pointer & 0x80) == 0x00 ? \
(*((string_a).pointer++) = *((string_b).pointer++)) : \
(*(string_b).pointer & 0xE0) == 0xC0 ? \
(*((string_a).pointer++) = *((string_b).pointer++), \
*((string_a).pointer++) = *((string_b).pointer++)) : \
(*(string_b).pointer & 0xF0) == 0xE0 ? \
(*((string_a).pointer++) = *((string_b).pointer++), \
*((string_a).pointer++) = *((string_b).pointer++), \
*((string_a).pointer++) = *((string_b).pointer++)) : \
(*(string_b).pointer & 0xF8) == 0xF0 ? \
(*((string_a).pointer++) = *((string_b).pointer++), \
*((string_a).pointer++) = *((string_b).pointer++), \
*((string_a).pointer++) = *((string_b).pointer++), \
*((string_a).pointer++) = *((string_b).pointer++)) : 0)
/*
* Stack and queue management.
*/
YAML_DECLARE(int)
yaml_stack_extend(void **start, void **top, void **end);
YAML_DECLARE(int)
yaml_queue_extend(void **start, void **head, void **tail, void **end);
#define STACK_INIT(context,stack,type) \
(((stack).start = (type)yaml_malloc(INITIAL_STACK_SIZE*sizeof(*(stack).start))) ? \
((stack).top = (stack).start, \
(stack).end = (stack).start+INITIAL_STACK_SIZE, \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define STACK_DEL(context,stack) \
(yaml_free((stack).start), \
(stack).start = (stack).top = (stack).end = 0)
#define STACK_EMPTY(context,stack) \
((stack).start == (stack).top)
#define STACK_LIMIT(context,stack,size) \
((stack).top - (stack).start < (size) ? \
1 : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define PUSH(context,stack,value) \
(((stack).top != (stack).end \
|| yaml_stack_extend((void **)&(stack).start, \
(void **)&(stack).top, (void **)&(stack).end)) ? \
(*((stack).top++) = value, \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define POP(context,stack) \
(*(--(stack).top))
#define QUEUE_INIT(context,queue,size,type) \
(((queue).start = (type)yaml_malloc((size)*sizeof(*(queue).start))) ? \
((queue).head = (queue).tail = (queue).start, \
(queue).end = (queue).start+(size), \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define QUEUE_DEL(context,queue) \
(yaml_free((queue).start), \
(queue).start = (queue).head = (queue).tail = (queue).end = 0)
#define QUEUE_EMPTY(context,queue) \
((queue).head == (queue).tail)
#define ENQUEUE(context,queue,value) \
(((queue).tail != (queue).end \
|| yaml_queue_extend((void **)&(queue).start, (void **)&(queue).head, \
(void **)&(queue).tail, (void **)&(queue).end)) ? \
(*((queue).tail++) = value, \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
#define DEQUEUE(context,queue) \
(*((queue).head++))
#define QUEUE_INSERT(context,queue,index,value) \
(((queue).tail != (queue).end \
|| yaml_queue_extend((void **)&(queue).start, (void **)&(queue).head, \
(void **)&(queue).tail, (void **)&(queue).end)) ? \
(memmove((queue).head+(index)+1,(queue).head+(index), \
((queue).tail-(queue).head-(index))*sizeof(*(queue).start)), \
*((queue).head+(index)) = value, \
(queue).tail++, \
1) : \
((context)->error = YAML_MEMORY_ERROR, \
0))
/*
* Token initializers.
*/
#define TOKEN_INIT(token,token_type,token_start_mark,token_end_mark) \
(memset(&(token), 0, sizeof(yaml_token_t)), \
(token).type = (token_type), \
(token).start_mark = (token_start_mark), \
(token).end_mark = (token_end_mark))
#define STREAM_START_TOKEN_INIT(token,token_encoding,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_STREAM_START_TOKEN,(start_mark),(end_mark)), \
(token).data.stream_start.encoding = (token_encoding))
#define STREAM_END_TOKEN_INIT(token,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_STREAM_END_TOKEN,(start_mark),(end_mark)))
#define ALIAS_TOKEN_INIT(token,token_value,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_ALIAS_TOKEN,(start_mark),(end_mark)), \
(token).data.alias.value = (token_value))
#define ANCHOR_TOKEN_INIT(token,token_value,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_ANCHOR_TOKEN,(start_mark),(end_mark)), \
(token).data.anchor.value = (token_value))
#define TAG_TOKEN_INIT(token,token_handle,token_suffix,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_TAG_TOKEN,(start_mark),(end_mark)), \
(token).data.tag.handle = (token_handle), \
(token).data.tag.suffix = (token_suffix))
#define SCALAR_TOKEN_INIT(token,token_value,token_length,token_style,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_SCALAR_TOKEN,(start_mark),(end_mark)), \
(token).data.scalar.value = (token_value), \
(token).data.scalar.length = (token_length), \
(token).data.scalar.style = (token_style))
#define VERSION_DIRECTIVE_TOKEN_INIT(token,token_major,token_minor,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_VERSION_DIRECTIVE_TOKEN,(start_mark),(end_mark)), \
(token).data.version_directive.major = (token_major), \
(token).data.version_directive.minor = (token_minor))
#define TAG_DIRECTIVE_TOKEN_INIT(token,token_handle,token_prefix,start_mark,end_mark) \
(TOKEN_INIT((token),YAML_TAG_DIRECTIVE_TOKEN,(start_mark),(end_mark)), \
(token).data.tag_directive.handle = (token_handle), \
(token).data.tag_directive.prefix = (token_prefix))
/*
* Event initializers.
*/
#define EVENT_INIT(event,event_type,event_start_mark,event_end_mark) \
(memset(&(event), 0, sizeof(yaml_event_t)), \
(event).type = (event_type), \
(event).start_mark = (event_start_mark), \
(event).end_mark = (event_end_mark))
#define STREAM_START_EVENT_INIT(event,event_encoding,start_mark,end_mark) \
(EVENT_INIT((event),YAML_STREAM_START_EVENT,(start_mark),(end_mark)), \
(event).data.stream_start.encoding = (event_encoding))
#define STREAM_END_EVENT_INIT(event,start_mark,end_mark) \
(EVENT_INIT((event),YAML_STREAM_END_EVENT,(start_mark),(end_mark)))
#define DOCUMENT_START_EVENT_INIT(event,event_version_directive, \
event_tag_directives_start,event_tag_directives_end,event_implicit,start_mark,end_mark) \
(EVENT_INIT((event),YAML_DOCUMENT_START_EVENT,(start_mark),(end_mark)), \
(event).data.document_start.version_directive = (event_version_directive), \
(event).data.document_start.tag_directives.start = (event_tag_directives_start), \
(event).data.document_start.tag_directives.end = (event_tag_directives_end), \
(event).data.document_start.implicit = (event_implicit))
#define DOCUMENT_END_EVENT_INIT(event,event_implicit,start_mark,end_mark) \
(EVENT_INIT((event),YAML_DOCUMENT_END_EVENT,(start_mark),(end_mark)), \
(event).data.document_end.implicit = (event_implicit))
#define ALIAS_EVENT_INIT(event,event_anchor,start_mark,end_mark) \
(EVENT_INIT((event),YAML_ALIAS_EVENT,(start_mark),(end_mark)), \
(event).data.alias.anchor = (event_anchor))
#define SCALAR_EVENT_INIT(event,event_anchor,event_tag,event_value,event_length, \
event_plain_implicit, event_quoted_implicit,event_style,start_mark,end_mark) \
(EVENT_INIT((event),YAML_SCALAR_EVENT,(start_mark),(end_mark)), \
(event).data.scalar.anchor = (event_anchor), \
(event).data.scalar.tag = (event_tag), \
(event).data.scalar.value = (event_value), \
(event).data.scalar.length = (event_length), \
(event).data.scalar.plain_implicit = (event_plain_implicit), \
(event).data.scalar.quoted_implicit = (event_quoted_implicit), \
(event).data.scalar.style = (event_style))
#define SEQUENCE_START_EVENT_INIT(event,event_anchor,event_tag, \
event_implicit,event_style,start_mark,end_mark) \
(EVENT_INIT((event),YAML_SEQUENCE_START_EVENT,(start_mark),(end_mark)), \
(event).data.sequence_start.anchor = (event_anchor), \
(event).data.sequence_start.tag = (event_tag), \
(event).data.sequence_start.implicit = (event_implicit), \
(event).data.sequence_start.style = (event_style))
#define SEQUENCE_END_EVENT_INIT(event,start_mark,end_mark) \
(EVENT_INIT((event),YAML_SEQUENCE_END_EVENT,(start_mark),(end_mark)))
#define MAPPING_START_EVENT_INIT(event,event_anchor,event_tag, \
event_implicit,event_style,start_mark,end_mark) \
(EVENT_INIT((event),YAML_MAPPING_START_EVENT,(start_mark),(end_mark)), \
(event).data.mapping_start.anchor = (event_anchor), \
(event).data.mapping_start.tag = (event_tag), \
(event).data.mapping_start.implicit = (event_implicit), \
(event).data.mapping_start.style = (event_style))
#define MAPPING_END_EVENT_INIT(event,start_mark,end_mark) \
(EVENT_INIT((event),YAML_MAPPING_END_EVENT,(start_mark),(end_mark)))
/*
* Document initializer.
*/
#define DOCUMENT_INIT(document,document_nodes_start,document_nodes_end, \
document_version_directive,document_tag_directives_start, \
document_tag_directives_end,document_start_implicit, \
document_end_implicit,document_start_mark,document_end_mark) \
(memset(&(document), 0, sizeof(yaml_document_t)), \
(document).nodes.start = (document_nodes_start), \
(document).nodes.end = (document_nodes_end), \
(document).nodes.top = (document_nodes_start), \
(document).version_directive = (document_version_directive), \
(document).tag_directives.start = (document_tag_directives_start), \
(document).tag_directives.end = (document_tag_directives_end), \
(document).start_implicit = (document_start_implicit), \
(document).end_implicit = (document_end_implicit), \
(document).start_mark = (document_start_mark), \
(document).end_mark = (document_end_mark))
/*
* Node initializers.
*/
#define NODE_INIT(node,node_type,node_tag,node_start_mark,node_end_mark) \
(memset(&(node), 0, sizeof(yaml_node_t)), \
(node).type = (node_type), \
(node).tag = (node_tag), \
(node).start_mark = (node_start_mark), \
(node).end_mark = (node_end_mark))
#define SCALAR_NODE_INIT(node,node_tag,node_value,node_length, \
node_style,start_mark,end_mark) \
(NODE_INIT((node),YAML_SCALAR_NODE,(node_tag),(start_mark),(end_mark)), \
(node).data.scalar.value = (node_value), \
(node).data.scalar.length = (node_length), \
(node).data.scalar.style = (node_style))
#define SEQUENCE_NODE_INIT(node,node_tag,node_items_start,node_items_end, \
node_style,start_mark,end_mark) \
(NODE_INIT((node),YAML_SEQUENCE_NODE,(node_tag),(start_mark),(end_mark)), \
(node).data.sequence.items.start = (node_items_start), \
(node).data.sequence.items.end = (node_items_end), \
(node).data.sequence.items.top = (node_items_start), \
(node).data.sequence.style = (node_style))
#define MAPPING_NODE_INIT(node,node_tag,node_pairs_start,node_pairs_end, \
node_style,start_mark,end_mark) \
(NODE_INIT((node),YAML_MAPPING_NODE,(node_tag),(start_mark),(end_mark)), \
(node).data.mapping.pairs.start = (node_pairs_start), \
(node).data.mapping.pairs.end = (node_pairs_end), \
(node).data.mapping.pairs.top = (node_pairs_start), \
(node).data.mapping.style = (node_style))
/* Strict C compiler warning helpers */
#if defined(__clang__) || defined(__GNUC__)
# define HASATTRIBUTE_UNUSED
#endif
#ifdef HASATTRIBUTE_UNUSED
# define __attribute__unused__ __attribute__((__unused__))
#else
# define __attribute__unused__
#endif
/* Shim arguments are arguments that must be included in your function,
* but serve no purpose inside. Silence compiler warnings. */
#define SHIM(a) /*@unused@*/ a __attribute__unused__
/* UNUSED_PARAM() marks a shim argument in the body to silence compiler warnings */
#ifdef __clang__
# define UNUSED_PARAM(a) (void)(a);
#else
# define UNUSED_PARAM(a) /*@-noeffect*/if (0) (void)(a)/*@=noeffect*/;
#endif
#define YAML_MALLOC_STATIC(type) (type*)yaml_malloc(sizeof(type))
#define YAML_MALLOC(size) (yaml_char_t *)yaml_malloc(size)

View File

@ -1,32 +0,0 @@
add_library(Yams
Constructor.swift
Decoder.swift
Emitter.swift
Encoder.swift
Mark.swift
Node.Mapping.swift
Node.Scalar.swift
Node.Sequence.swift
Node.swift
Parser.swift
Representer.swift
Resolver.swift
String+Yams.swift
Tag.swift
YamlError.swift)
target_compile_definitions(Yams PRIVATE
SWIFT_PACKAGE)
target_compile_options(Yams PRIVATE
$<$<BOOL:${BUILD_TESTING}>:-enable-testing>)
target_link_libraries(Yams PRIVATE
CYaml
$<$<NOT:$<PLATFORM_ID:Darwin>>:dispatch>
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>)
set_target_properties(Yams PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
set_property(GLOBAL APPEND PROPERTY YAMS_EXPORTS Yams)
swift_install(TARGETS Yams
EXPORT YamsExports)

View File

@ -1,598 +0,0 @@
//
// Constructor.swift
// Yams
//
// Created by Norio Nomura on 12/21/16.
// Copyright (c) 2016 Yams. All rights reserved.
//
import Foundation
/// Constructors are used to translate `Node`s to Swift values.
public final class Constructor {
/// Maps `Tag.Name`s to `Node.Scalar`s.
public typealias ScalarMap = [Tag.Name: (Node.Scalar) -> Any?]
/// Maps `Tag.Name`s to `Node.Mapping`s.
public typealias MappingMap = [Tag.Name: (Node.Mapping) -> Any?]
/// Maps `Tag.Name`s to `Node.Sequence`s.
public typealias SequenceMap = [Tag.Name: (Node.Sequence) -> Any?]
/// Initialize a `Constructor` with the specified maps, falling back to default maps.
///
/// - parameter scalarMap: Maps `Tag.Name`s to `Node.Scalar`s.
/// - parameter mappingMap: Maps `Tag.Name`s to `Node.Mapping`s.
/// - parameter sequenceMap: Maps `Tag.Name`s to `Node.Sequence`s.
public init(_ scalarMap: ScalarMap = defaultScalarMap,
_ mappingMap: MappingMap = defaultMappingMap,
_ sequenceMap: SequenceMap = defaultSequenceMap) {
self.scalarMap = scalarMap
self.mappingMap = mappingMap
self.sequenceMap = sequenceMap
}
/// Constructs Swift values based on the maps this `Constructor` was initialized with.
///
/// - parameter node: `Node` from which to extract an `Any` Swift value, if one was produced by the Node
/// type's relevant mapping on this `Constructor`.
///
/// - returns: An `Any` Swift value, if one was produced by the Node type's relevant mapping on this
/// `Constructor`.
public func any(from node: Node) -> Any {
switch node {
case .scalar(let scalar):
if let method = scalarMap[node.tag.name], let result = method(scalar) {
return result
}
return String.construct(from: scalar)!
case .mapping(let mapping):
if let method = mappingMap[node.tag.name], let result = method(mapping) {
return result
}
return [AnyHashable: Any]._construct_mapping(from: mapping)
case .sequence(let sequence):
if let method = sequenceMap[node.tag.name], let result = method(sequence) {
return result
}
return [Any].construct_seq(from: sequence)
}
}
private let scalarMap: ScalarMap
private let mappingMap: MappingMap
private let sequenceMap: SequenceMap
}
// MARK: - Default Mappings
extension Constructor {
/// The default `Constructor` to be used with APIs where none is explicitly provided.
public static let `default` = Constructor()
/// The default `Tag.Name` to `Node.Scalar` map.
public static let defaultScalarMap: ScalarMap = [
// Failsafe Schema
.str: String.construct,
// JSON Schema
.bool: Bool.construct,
.float: Double.construct,
.null: NSNull.construct,
.int: MemoryLayout<Int>.size == 8 ? Int.construct : { Int.construct(from: $0) ?? Int64.construct(from: $0) },
// http://yaml.org/type/index.html
.binary: Data.construct,
.timestamp: Date.construct
]
/// The default `Tag.Name` to `Node.Mapping` map.
public static let defaultMappingMap: MappingMap = [
.map: [AnyHashable: Any].construct_mapping,
// http://yaml.org/type/index.html
.set: Set<AnyHashable>.construct_set
// .merge is supported in `[AnyHashable: Any].construct_mapping`.
// .value is supported in `String.construct` and `[AnyHashable: Any].construct_mapping`.
]
/// The default `Tag.Name` to `Node.Sequence` map.
public static let defaultSequenceMap: SequenceMap = [
.seq: [Any].construct_seq,
// http://yaml.org/type/index.html
.omap: [Any].construct_omap,
.pairs: [Any].construct_pairs
]
}
// MARK: - ScalarConstructible
/// Types conforming to this protocol can be extracted `Node.Scalar`s.
public protocol ScalarConstructible {
/// Construct an instance of `Self`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Self`, if possible.
///
/// - returns: An instance of `Self`, if one was successfully extracted from the scalar.
///
/// - note: We use static constructors to avoid overloading `init?(_ scalar: Node.Scalar)` which would
/// cause callsite ambiguities when using `init` as closure.
static func construct(from scalar: Node.Scalar) -> Self?
}
// MARK: - ScalarConstructible UUID Conformance
extension UUID: ScalarConstructible {
/// Construct an instance of `UUID`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `UUID`, if possible.
///
/// - returns: An instance of `UUID`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> UUID? {
return UUID(uuidString: scalar.string)
}
}
// MARK: - ScalarConstructible Bool Conformance
extension Bool: ScalarConstructible {
/// Construct an instance of `Bool`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Bool`, if possible.
///
/// - returns: An instance of `Bool`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Bool? {
switch scalar.string.lowercased() {
case "true", "yes", "on":
return true
case "false", "no", "off":
return false
default:
return nil
}
}
}
// MARK: - ScalarConstructible Data Conformance
extension Data: ScalarConstructible {
/// Construct an instance of `Data`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Data`, if possible.
///
/// - returns: An instance of `Data`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Data? {
return Data(base64Encoded: scalar.string, options: .ignoreUnknownCharacters)
}
}
// MARK: - ScalarConstructible Date Conformance
extension Date: ScalarConstructible {
/// Construct an instance of `Date`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Date`, if possible.
///
/// - returns: An instance of `Date`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Date? {
let range = NSRange(location: 0, length: scalar.string.utf16.count)
guard let result = timestampPattern.firstMatch(in: scalar.string, options: [], range: range),
result.range.location != NSNotFound else {
return nil
}
let components = (1..<result.numberOfRanges).map {
scalar.string.substring(with: result.range(at: $0))
}
var datecomponents = DateComponents()
datecomponents.calendar = gregorianCalendar
datecomponents.year = components[0].flatMap { Int($0) }
datecomponents.month = components[1].flatMap { Int($0) }
datecomponents.day = components[2].flatMap { Int($0) }
datecomponents.hour = components[3].flatMap { Int($0) }
datecomponents.minute = components[4].flatMap { Int($0) }
datecomponents.second = components[5].flatMap { Int($0) }
let nanoseconds: TimeInterval? = components[6].flatMap { fraction in
let length = fraction.count
let nanoseconds: Int?
if length < 9 {
nanoseconds = Int(fraction).map { number in
repeatElement(10, count: 9 - length).reduce(number, *)
}
} else {
nanoseconds = Int(fraction.prefix(9))
}
return nanoseconds.map { Double($0) / 1_000_000_000.0 }
}
datecomponents.timeZone = {
var seconds = 0
if let hourInSecond = components[9].flatMap({ Int($0) }).map({ $0 * 60 * 60 }) {
seconds += hourInSecond
}
if let minuteInSecond = components[10].flatMap({ Int($0) }).map({ $0 * 60 }) {
seconds += minuteInSecond
}
if components[8] == "-" { // sign
seconds *= -1
}
return TimeZone(secondsFromGMT: seconds)
}()
return datecomponents.date.map { nanoseconds.map($0.addingTimeInterval) ?? $0 }
}
private static let gregorianCalendar = Calendar(identifier: .gregorian)
private static let timestampPattern: NSRegularExpression = pattern([
"^([0-9][0-9][0-9][0-9])", // year
"-([0-9][0-9]?)", // month
"-([0-9][0-9]?)", // day
"(?:(?:[Tt]|[ \\t]+)",
"([0-9][0-9]?)", // hour
":([0-9][0-9])", // minute
":([0-9][0-9])", // second
"(?:\\.([0-9]*))?", // fraction
"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)", // tz_sign, tz_hour
"(?::([0-9][0-9]))?))?)?$" // tz_minute
].joined()
)
}
// MARK: - ScalarConstructible Double Conformance
extension Double: ScalarConstructible {}
// MARK: - ScalarConstructible Float Conformance
extension Float: ScalarConstructible {}
// MARK: - ScalarConstructible FloatingPoint Conformance
extension ScalarConstructible where Self: FloatingPoint & SexagesimalConvertible {
/// Construct an instance of `FloatingPoint & SexagesimalConvertible`, if possible, from the specified
/// scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type
/// `FloatingPoint & SexagesimalConvertible`, if possible.
///
/// - returns: An instance of `FloatingPoint & SexagesimalConvertible`, if one was successfully extracted
/// from the scalar.
public static func construct(from scalar: Node.Scalar) -> Self? {
guard scalar.style == .any || scalar.style == .plain else {
return nil
}
switch scalar.string {
case ".inf", ".Inf", ".INF", "+.inf", "+.Inf", "+.INF":
return .infinity
case "-.inf", "-.Inf", "-.INF":
return -.infinity
case ".nan", ".NaN", ".NAN":
return .nan
default:
let string = scalar.string.replacingOccurrences(of: "_", with: "")
if string.contains(":") {
return Self(sexagesimal: string)
}
return .create(from: string)
}
}
}
private extension FixedWidthInteger where Self: SexagesimalConvertible {
static func _construct(from scalar: Node.Scalar) -> Self? {
guard scalar.style == .any || scalar.style == .plain else {
return nil
}
let scalarWithSign = scalar.string.replacingOccurrences(of: "_", with: "")
if scalarWithSign == "0" {
return 0
}
let negative = scalarWithSign.hasPrefix("-")
guard isSigned || !negative else { return nil }
let signPrefix = negative ? "-" : ""
let hasSign = negative || scalarWithSign.hasPrefix("+")
let prefixToRadix: [(String, Int)] = [
("0x", 16),
("0b", 2),
("0o", 8),
("0", 8)
]
let scalar = scalarWithSign.dropFirst(hasSign ? 1 : 0)
for (prefix, radix) in prefixToRadix where scalar.hasPrefix(prefix) {
return Self(signPrefix + scalar.dropFirst(prefix.count), radix: radix)
}
if scalar.contains(":") {
return Self(sexagesimal: scalarWithSign)
}
return Self(scalarWithSign)
}
}
// MARK: - ScalarConstructible Int Conformance
extension Int: ScalarConstructible {
/// Construct an instance of `Int`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Int`, if possible.
///
/// - returns: An instance of `Int`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Int? {
return _construct(from: scalar)
}
}
// MARK: - ScalarConstructible UInt Conformance
extension UInt: ScalarConstructible {
/// Construct an instance of `UInt`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `UInt`, if possible.
///
/// - returns: An instance of `UInt`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> UInt? {
return _construct(from: scalar)
}
}
// MARK: - ScalarConstructible Int64 Conformance
extension Int64: ScalarConstructible {
/// Construct an instance of `Int64`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Int64`, if possible.
///
/// - returns: An instance of `Int64`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Int64? {
return _construct(from: scalar)
}
}
// MARK: - ScalarConstructible UInt64 Conformance
extension UInt64: ScalarConstructible {
/// Construct an instance of `UInt64`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `UInt64`, if possible.
///
/// - returns: An instance of `UInt64`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> UInt64? {
return _construct(from: scalar)
}
}
// MARK: - ScalarConstructible String Conformance
extension String: ScalarConstructible {
/// Construct an instance of `String`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `String`, if possible.
///
/// - returns: An instance of `String`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> String? {
return scalar.string
}
/// Construct an instance of `String`, if possible, from the specified `Node`.
///
/// - parameter node: The `Node` from which to extract a value of type `String`, if possible.
///
/// - returns: An instance of `String`, if one was successfully extracted from the node.
public static func construct(from node: Node) -> String? {
// This will happen while `Dictionary.flatten_mapping()` if `node.tag.name` was `.value`
if case let .mapping(mapping) = node {
for (key, value) in mapping where key.tag.name == .value {
return construct(from: value)
}
}
return node.scalar?.string
}
}
// MARK: - Types that can't conform to ScalarConstructible
extension NSNull/*: ScalarConstructible*/ {
/// Construct an instance of `NSNull`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `NSNull`, if possible.
///
/// - returns: An instance of `NSNull`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> NSNull? {
switch scalar.string {
case "", "~", "null", "Null", "NULL":
return NSNull()
default:
return nil
}
}
}
// MARK: Mapping
extension Dictionary {
/// Construct a `Dictionary`, if possible, from the specified mapping.
///
/// - parameter mapping: The `Node.Mapping` from which to extract a `Dictionary`, if possible.
///
/// - returns: An instance of `[AnyHashable: Any]`, if one was successfully extracted from the mapping.
public static func construct_mapping(from mapping: Node.Mapping) -> [AnyHashable: Any]? {
return _construct_mapping(from: mapping)
}
}
private extension Dictionary {
static func _construct_mapping(from mapping: Node.Mapping) -> [AnyHashable: Any] {
let mapping = mapping.flatten()
// TODO: YAML supports keys other than str.
return [AnyHashable: Any](
mapping.map { (String.construct(from: $0.key)!, mapping.tag.constructor.any(from: $0.value)) },
uniquingKeysWith: { _, second in second }
)
}
}
extension Set {
/// Construct a `Set`, if possible, from the specified mapping.
///
/// - parameter mapping: The `Node.Mapping` from which to extract a `Set`, if possible.
///
/// - returns: An instance of `Set<AnyHashable>`, if one was successfully extracted from the mapping.
public static func construct_set(from mapping: Node.Mapping) -> Set<AnyHashable>? {
// TODO: YAML supports Hashable elements other than str.
return Set<AnyHashable>(mapping.map({ String.construct(from: $0.key)! as AnyHashable }))
// Explicitly declaring the generic parameter as `<AnyHashable>` above is required,
// because this is inside extension of `Set` and Swift can't infer the type without that.
}
}
// MARK: Sequence
extension Array {
/// Construct an Array of `Any` from the specified `sequence`.
///
/// - parameter sequence: Sequence to convert to `Array<Any>`.
///
/// - returns: Array of `Any`.
public static func construct_seq(from sequence: Node.Sequence) -> [Any] {
return sequence.map(sequence.tag.constructor.any)
}
/// Construct an "O-map" (array of `(Any, Any)` tuples) from the specified `sequence`.
///
/// - parameter sequence: Sequence to convert to `Array<(Any, Any)>`.
///
/// - returns: Array of `(Any, Any)` tuples.
public static func construct_omap(from sequence: Node.Sequence) -> [(Any, Any)] {
// Note: we do not check for duplicate keys.
return sequence.compactMap { subnode -> (Any, Any)? in
// TODO: Should raise error if subnode is not mapping or mapping.count != 1
guard let (key, value) = subnode.mapping?.first else { return nil }
return (sequence.tag.constructor.any(from: key), sequence.tag.constructor.any(from: value))
}
}
/// Construct an array of `(Any, Any)` tuples from the specified `sequence`.
///
/// - parameter sequence: Sequence to convert to `Array<(Any, Any)>`.
///
/// - returns: Array of `(Any, Any)` tuples.
public static func construct_pairs(from sequence: Node.Sequence) -> [(Any, Any)] {
// Note: we do not check for duplicate keys.
return sequence.compactMap { subnode -> (Any, Any)? in
// TODO: Should raise error if subnode is not mapping or mapping.count != 1
guard let (key, value) = subnode.mapping?.first else { return nil }
return (sequence.tag.constructor.any(from: key), sequence.tag.constructor.any(from: value))
}
}
}
private extension String {
func substring(with range: NSRange) -> Substring? {
guard range.location != NSNotFound else { return nil }
let utf16lowerBound = utf16.index(utf16.startIndex, offsetBy: range.location)
let utf16upperBound = utf16.index(utf16lowerBound, offsetBy: range.length)
guard let lowerBound = utf16lowerBound.samePosition(in: self),
let upperBound = utf16upperBound.samePosition(in: self) else {
fatalError("unreachable")
}
return self[lowerBound..<upperBound]
}
}
// MARK: - SexagesimalConvertible
/// Confirming types are convertible to base 60 numeric values.
public protocol SexagesimalConvertible: ExpressibleByIntegerLiteral {
/// Creates a sexagesimal numeric value from the given string.
///
/// - parameter string: The string from which to parse a sexagesimal value.
///
/// - returns: A sexagesimal numeric value, if one was successfully parsed.
static func create(from string: String) -> Self?
/// Multiplies two sexagesimal numeric values.
///
/// - parameter lhs: Left hand side multiplier.
/// - parameter rhs: Right hand side multiplier.
///
/// - returns: The result of the multiplication.
static func * (lhs: Self, rhs: Self) -> Self
/// Adds two sexagesimal numeric values.
///
/// - parameter lhs: Left hand side adder.
/// - parameter rhs: Right hand side adder.
///
/// - returns: The result of the addition.
static func + (lhs: Self, rhs: Self) -> Self
}
private extension SexagesimalConvertible {
init(sexagesimal value: String) {
self = value.sexagesimal()
}
}
// MARK: Default String to `LosslessStringConvertible` conversion.
extension SexagesimalConvertible where Self: LosslessStringConvertible {
/// Creates a sexagesimal numeric value from the given string.
///
/// - parameter string: The string from which to parse a sexagesimal value.
///
/// - returns: A sexagesimal numeric value, if one was successfully parsed.
public static func create(from string: String) -> Self? {
return Self(string)
}
}
// MARK: Default String to `FixedWidthInteger` conversion.
extension SexagesimalConvertible where Self: FixedWidthInteger {
/// Creates a sexagesimal numeric value from the given string.
///
/// - parameter string: The string from which to parse a sexagesimal value.
///
/// - returns: A sexagesimal numeric value, if one was successfully parsed.
public static func create(from string: String) -> Self? {
return Self(string, radix: 10)
}
}
// MARK: - SexagesimalConvertible Double Conformance
extension Double: SexagesimalConvertible {}
// MARK: - SexagesimalConvertible Float Conformance
extension Float: SexagesimalConvertible {}
// MARK: - SexagesimalConvertible Int Conformance
extension Int: SexagesimalConvertible {}
// MARK: - SexagesimalConvertible UInt Conformance
extension UInt: SexagesimalConvertible {}
// MARK: - SexagesimalConvertible Int64 Conformance
extension Int64: SexagesimalConvertible {}
// MARK: - SexagesimalConvertible UInt64 Conformance
extension UInt64: SexagesimalConvertible {}
private extension String {
func sexagesimal<T>() -> T where T: SexagesimalConvertible {
assert(contains(":"))
var scalar = self
let sign: T
if scalar.hasPrefix("-") {
sign = -1
scalar = String(scalar.dropFirst())
} else if scalar.hasPrefix("+") {
scalar = String(scalar.dropFirst())
sign = 1
} else {
sign = 1
}
let digits = scalar.components(separatedBy: ":").compactMap(T.create).reversed()
let (_, value) = digits.reduce((1, 0) as (T, T)) { baseAndValue, digit in
let value = baseAndValue.1 + (digit * baseAndValue.0)
let base = baseAndValue.0 * 60
return (base, value)
}
return sign * value
}
}
// swiftlint:disable:this file_length

View File

@ -1,368 +0,0 @@
//
// Decoder.swift
// Yams
//
// Created by Norio Nomura on 5/6/17.
// Copyright (c) 2017 Yams. All rights reserved.
//
import Foundation
/// `Codable`-style `Decoder` that can be used to decode a `Decodable` type from a given `String` and optional
/// user info mapping. Similar to `Foundation.JSONDecoder`.
public class YAMLDecoder {
/// Creates a `YAMLDecoder` instance.
///
/// - parameter encoding: Encoding, `.default` if omitted.
public init(encoding: Parser.Encoding = .default) {
self.encoding = encoding
}
/// Decode a `Decodable` type from a given `String` and optional user info mapping.
///
/// - parameter type: `Decodable` type to decode.
/// - parameter yaml: YAML string to decode.
/// - parameter userInfo: Additional key/values which can be used when looking up keys to decode.
///
/// - returns: Returns the decoded type `T`.
///
/// - throws: `DecodingError` or `YamlError` if something went wrong while decoding.
public func decode<T>(_ type: T.Type = T.self,
from yaml: String,
userInfo: [CodingUserInfoKey: Any] = [:]) throws -> T where T: Swift.Decodable {
do {
let node = try Parser(yaml: yaml, resolver: Resolver([.merge]), encoding: encoding).singleRoot() ?? ""
let decoder = _Decoder(referencing: node, userInfo: userInfo)
let container = try decoder.singleValueContainer()
return try container.decode(type)
} catch let error as DecodingError {
throw error
} catch {
throw DecodingError.dataCorrupted(.init(codingPath: [],
debugDescription: "The given data was not valid YAML.",
underlyingError: error))
}
}
/// Decode a `Decodable` type from a given `Data` and optional user info mapping.
///
/// - parameter type: `Decodable` type to decode.
/// - parameter yaml: YAML data to decode.
/// - parameter userInfo: Additional key/values which can be used when looking up keys to decode.
///
/// - returns: Returns the decoded type `T`.
///
/// - throws: `DecodingError` or `YamlError` if something went wrong while decoding.
public func decode<T>(_ type: T.Type = T.self,
from yamlData: Data,
userInfo: [CodingUserInfoKey: Any] = [:]) throws -> T where T: Swift.Decodable {
guard let yamlString = String(data: yamlData, encoding: encoding.swiftStringEncoding) else {
throw YamlError.dataCouldNotBeDecoded(encoding: encoding.swiftStringEncoding)
}
return try decode(type, from: yamlString, userInfo: userInfo)
}
/// Encoding
public var encoding: Parser.Encoding
}
private struct _Decoder: Decoder {
fileprivate let node: Node
init(referencing node: Node, userInfo: [CodingUserInfoKey: Any], codingPath: [CodingKey] = []) {
self.node = node
self.userInfo = userInfo
self.codingPath = codingPath
}
// MARK: - Swift.Decoder Methods
let codingPath: [CodingKey]
let userInfo: [CodingUserInfoKey: Any]
func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> {
guard let mapping = node.mapping?.flatten() else {
throw _typeMismatch(at: codingPath, expectation: Node.Mapping.self, reality: node)
}
return .init(_KeyedDecodingContainer<Key>(decoder: self, wrapping: mapping))
}
func unkeyedContainer() throws -> UnkeyedDecodingContainer {
guard let sequence = node.sequence else {
throw _typeMismatch(at: codingPath, expectation: Node.Sequence.self, reality: node)
}
return _UnkeyedDecodingContainer(decoder: self, wrapping: sequence)
}
func singleValueContainer() throws -> SingleValueDecodingContainer { return self }
// MARK: -
/// create a new `_Decoder` instance referencing `node` as `key` inheriting `userInfo`
func decoder(referencing node: Node, `as` key: CodingKey) -> _Decoder {
return .init(referencing: node, userInfo: userInfo, codingPath: codingPath + [key])
}
/// returns `Node.Scalar` or throws `DecodingError.typeMismatch`
private func scalar() throws -> Node.Scalar {
switch node {
case .scalar(let scalar):
return scalar
case .mapping(let mapping):
throw _typeMismatch(at: codingPath, expectation: Node.Scalar.self, reality: mapping)
case .sequence(let sequence):
throw _typeMismatch(at: codingPath, expectation: Node.Scalar.self, reality: sequence)
}
}
}
private struct _KeyedDecodingContainer<Key: CodingKey>: KeyedDecodingContainerProtocol {
private let decoder: _Decoder
private let mapping: Node.Mapping
init(decoder: _Decoder, wrapping mapping: Node.Mapping) {
self.decoder = decoder
self.mapping = mapping
}
// MARK: - Swift.KeyedDecodingContainerProtocol Methods
var codingPath: [CodingKey] { return decoder.codingPath }
var allKeys: [Key] { return mapping.keys.compactMap { $0.string.flatMap(Key.init(stringValue:)) } }
func contains(_ key: Key) -> Bool { return mapping[key.stringValue] != nil }
func decodeNil(forKey key: Key) throws -> Bool {
return try decoder(for: key).decodeNil()
}
func decode<T>(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable & ScalarConstructible {
return try decoder(for: key).decode(type)
}
func decode<T>(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable {
return try decoder(for: key).decode(type)
}
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type,
forKey key: Key) throws -> KeyedDecodingContainer<NestedKey> {
return try decoder(for: key).container(keyedBy: type)
}
func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer {
return try decoder(for: key).unkeyedContainer()
}
func superDecoder() throws -> Decoder { return try decoder(for: _YAMLCodingKey.super) }
func superDecoder(forKey key: Key) throws -> Decoder { return try decoder(for: key) }
// MARK: -
private func node(for key: CodingKey) throws -> Node {
guard let node = mapping[key.stringValue] else {
throw _keyNotFound(at: codingPath, key, "No value associated with key \(key) (\"\(key.stringValue)\").")
}
return node
}
private func decoder(for key: CodingKey) throws -> _Decoder {
return decoder.decoder(referencing: try node(for: key), as: key)
}
}
private struct _UnkeyedDecodingContainer: UnkeyedDecodingContainer {
private let decoder: _Decoder
private let sequence: Node.Sequence
init(decoder: _Decoder, wrapping sequence: Node.Sequence) {
self.decoder = decoder
self.sequence = sequence
self.currentIndex = 0
}
// MARK: - Swift.UnkeyedDecodingContainer Methods
var codingPath: [CodingKey] { return decoder.codingPath }
var count: Int? { return sequence.count }
var isAtEnd: Bool { return currentIndex >= sequence.count }
var currentIndex: Int
mutating func decodeNil() throws -> Bool {
try throwErrorIfAtEnd(Any?.self)
return try currentDecoder { $0.decodeNil() }
}
mutating func decode<T>(_ type: T.Type) throws -> T where T: Decodable & ScalarConstructible {
return try currentDecoder { try $0.decode(type) }
}
mutating func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
return try currentDecoder { try $0.decode(type) }
}
mutating func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer<NestedKey> {
return try currentDecoder { try $0.container(keyedBy: type) }
}
mutating func nestedUnkeyedContainer() throws -> UnkeyedDecodingContainer {
return try currentDecoder { try $0.unkeyedContainer() }
}
mutating func superDecoder() throws -> Decoder { return try currentDecoder { $0 } }
// MARK: -
private var currentKey: CodingKey { return _YAMLCodingKey(index: currentIndex) }
private var currentNode: Node { return sequence[currentIndex] }
private func throwErrorIfAtEnd<T>(_ type: T.Type) throws {
if isAtEnd { throw _valueNotFound(at: codingPath + [currentKey], type, "Unkeyed container is at end.") }
}
private mutating func currentDecoder<T>(closure: (_Decoder) throws -> T) throws -> T {
try throwErrorIfAtEnd(T.self)
let decoded: T = try closure(decoder.decoder(referencing: currentNode, as: currentKey))
currentIndex += 1
return decoded
}
}
extension _Decoder: SingleValueDecodingContainer {
// MARK: - Swift.SingleValueDecodingContainer Methods
func decodeNil() -> Bool { return node.null == NSNull() }
func decode<T>(_ type: T.Type) throws -> T where T: Decodable & ScalarConstructible { return try construct(type) }
func decode<T>(_ type: T.Type) throws -> T where T: Decodable {return try construct(type) ?? type.init(from: self) }
// MARK: -
/// constuct `T` from `node`
private func construct<T: ScalarConstructible>(_ type: T.Type) throws -> T {
let scalar = try self.scalar()
guard let constructed = type.construct(from: scalar) else {
throw _typeMismatch(at: codingPath, expectation: type, reality: scalar)
}
return constructed
}
private func construct<T>(_ type: T.Type) throws -> T? {
guard let constructibleType = type as? ScalarConstructible.Type else {
return nil
}
let scalar = try self.scalar()
guard let value = constructibleType.construct(from: scalar) else {
throw _valueNotFound(at: codingPath, type, "Expected \(type) value but found \(scalar) instead.")
}
return value as? T
}
}
// MARK: - DecodingError helpers
private func _keyNotFound(at codingPath: [CodingKey], _ key: CodingKey, _ description: String) -> DecodingError {
let context = DecodingError.Context(codingPath: codingPath, debugDescription: description)
return.keyNotFound(key, context)
}
private func _valueNotFound(at codingPath: [CodingKey], _ type: Any.Type, _ description: String) -> DecodingError {
let context = DecodingError.Context(codingPath: codingPath, debugDescription: description)
return .valueNotFound(type, context)
}
private func _typeMismatch(at codingPath: [CodingKey], expectation: Any.Type, reality: Any) -> DecodingError {
let description = "Expected to decode \(expectation) but found \(type(of: reality)) instead."
let context = DecodingError.Context(codingPath: codingPath, debugDescription: description)
return .typeMismatch(expectation, context)
}
// MARK: - ScalarConstructible FixedWidthInteger & SignedInteger Conformance
extension FixedWidthInteger where Self: SignedInteger {
/// Construct an instance of `Self`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Self`, if possible.
///
/// - returns: An instance of `Self`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Self? {
return Int64.construct(from: scalar).flatMap(Self.init(exactly:))
}
}
// MARK: - ScalarConstructible FixedWidthInteger & UnsignedInteger Conformance
extension FixedWidthInteger where Self: UnsignedInteger {
/// Construct an instance of `Self`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Self`, if possible.
///
/// - returns: An instance of `Self`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Self? {
return UInt64.construct(from: scalar).flatMap(Self.init(exactly:))
}
}
// MARK: - ScalarConstructible Int8 Conformance
extension Int8: ScalarConstructible {}
// MARK: - ScalarConstructible Int16 Conformance
extension Int16: ScalarConstructible {}
// MARK: - ScalarConstructible Int32 Conformance
extension Int32: ScalarConstructible {}
// MARK: - ScalarConstructible UInt8 Conformance
extension UInt8: ScalarConstructible {}
// MARK: - ScalarConstructible UInt16 Conformance
extension UInt16: ScalarConstructible {}
// MARK: - ScalarConstructible UInt32 Conformance
extension UInt32: ScalarConstructible {}
// MARK: - ScalarConstructible Decimal Conformance
extension Decimal: ScalarConstructible {
/// Construct an instance of `Decimal`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `Decimal`, if possible.
///
/// - returns: An instance of `Decimal`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> Decimal? {
return Decimal(string: scalar.string)
}
}
// MARK: - ScalarConstructible URL Conformance
extension URL: ScalarConstructible {
/// Construct an instance of `URL`, if possible, from the specified scalar.
///
/// - parameter scalar: The `Node.Scalar` from which to extract a value of type `URL`, if possible.
///
/// - returns: An instance of `URL`, if one was successfully extracted from the scalar.
public static func construct(from scalar: Node.Scalar) -> URL? {
return URL(string: scalar.string)
}
}
// MARK: Decoder.mark
extension Decoder {
/// The `Mark` for the underlying `Node` that has been decoded.
public var mark: Mark? {
return (self as? _Decoder)?.node.mark
}
}
// MARK: TopLevelDecoder
#if canImport(Combine)
import protocol Combine.TopLevelDecoder
extension YAMLDecoder: TopLevelDecoder {
public typealias Input = Data
public func decode<T>(_ type: T.Type, from: Data) throws -> T where T: Decodable {
try decode(type, from: from, userInfo: [:])
}
}
#endif

View File

@ -1,522 +0,0 @@
//
// Emitter.swift
// Yams
//
// Created by Norio Nomura on 12/28/16.
// Copyright (c) 2016 Yams. All rights reserved.
//
#if SWIFT_PACKAGE
@_implementationOnly import CYaml
#endif
import Foundation
/// Produce a YAML string from objects.
///
/// - parameter objects: Sequence of Objects.
/// - parameter canonical: Output should be the "canonical" format as in the YAML specification.
/// - parameter indent: The indentation increment.
/// - parameter width: The preferred line width. @c -1 means unlimited.
/// - parameter allowUnicode: Unescaped non-ASCII characters are allowed if true.
/// - parameter lineBreak: Preferred line break.
/// - parameter explicitStart: Explicit document start `---`.
/// - parameter explicitEnd: Explicit document end `...`.
/// - parameter version: YAML version directive.
/// - parameter sortKeys: Whether or not to sort Mapping keys in lexicographic order.
/// - parameter sequenceStyle: The style for sequences (arrays / lists)
/// - parameter mappingStyle: The style for mappings (dictionaries)
///
/// - returns: YAML string.
///
/// - throws: `YamlError`.
public func dump<Objects>(
objects: Objects,
canonical: Bool = false,
indent: Int = 0,
width: Int = 0,
allowUnicode: Bool = false,
lineBreak: Emitter.LineBreak = .ln,
explicitStart: Bool = false,
explicitEnd: Bool = false,
version: (major: Int, minor: Int)? = nil,
sortKeys: Bool = false,
sequenceStyle: Node.Sequence.Style = .any,
mappingStyle: Node.Mapping.Style = .any) throws -> String
where Objects: Sequence {
func representable(from object: Any) throws -> NodeRepresentable {
if let representable = object as? NodeRepresentable {
return representable
}
throw YamlError.emitter(problem: "\(object) does not conform to NodeRepresentable!")
}
let nodes = try objects.map(representable(from:)).map { try $0.represented() }
return try serialize(
nodes: nodes,
canonical: canonical,
indent: indent,
width: width,
allowUnicode: allowUnicode,
lineBreak: lineBreak,
explicitStart: explicitStart,
explicitEnd: explicitEnd,
version: version,
sortKeys: sortKeys,
sequenceStyle: sequenceStyle,
mappingStyle: mappingStyle
)
}
/// Produce a YAML string from an object.
///
/// - parameter object: Object.
/// - parameter canonical: Output should be the "canonical" format as in the YAML specification.
/// - parameter indent: The indentation increment.
/// - parameter width: The preferred line width. @c -1 means unlimited.
/// - parameter allowUnicode: Unescaped non-ASCII characters are allowed if true.
/// - parameter lineBreak: Preferred line break.
/// - parameter explicitStart: Explicit document start `---`.
/// - parameter explicitEnd: Explicit document end `...`.
/// - parameter version: YAML version directive.
/// - parameter sortKeys: Whether or not to sort Mapping keys in lexicographic order.
/// - parameter sequenceStyle: The style for sequences (arrays / lists)
/// - parameter mappingStyle: The style for mappings (dictionaries)
///
/// - returns: YAML string.
///
/// - throws: `YamlError`.
public func dump(
object: Any?,
canonical: Bool = false,
indent: Int = 0,
width: Int = 0,
allowUnicode: Bool = false,
lineBreak: Emitter.LineBreak = .ln,
explicitStart: Bool = false,
explicitEnd: Bool = false,
version: (major: Int, minor: Int)? = nil,
sortKeys: Bool = false,
sequenceStyle: Node.Sequence.Style = .any,
mappingStyle: Node.Mapping.Style = .any) throws -> String {
return try serialize(
node: object.represented(),
canonical: canonical,
indent: indent,
width: width,
allowUnicode: allowUnicode,
lineBreak: lineBreak,
explicitStart: explicitStart,
explicitEnd: explicitEnd,
version: version,
sortKeys: sortKeys,
sequenceStyle: sequenceStyle,
mappingStyle: mappingStyle
)
}
/// Produce a YAML string from a `Node`.
///
/// - parameter nodes: Sequence of `Node`s.
/// - parameter canonical: Output should be the "canonical" format as in the YAML specification.
/// - parameter indent: The indentation increment.
/// - parameter width: The preferred line width. @c -1 means unlimited.
/// - parameter allowUnicode: Unescaped non-ASCII characters are allowed if true.
/// - parameter lineBreak: Preferred line break.
/// - parameter explicitStart: Explicit document start `---`.
/// - parameter explicitEnd: Explicit document end `...`.
/// - parameter version: YAML version directive.
/// - parameter sortKeys: Whether or not to sort Mapping keys in lexicographic order.
/// - parameter sequenceStyle: The style for sequences (arrays / lists)
/// - parameter mappingStyle: The style for mappings (dictionaries)
///
/// - returns: YAML string.
///
/// - throws: `YamlError`.
public func serialize<Nodes>(
nodes: Nodes,
canonical: Bool = false,
indent: Int = 0,
width: Int = 0,
allowUnicode: Bool = false,
lineBreak: Emitter.LineBreak = .ln,
explicitStart: Bool = false,
explicitEnd: Bool = false,
version: (major: Int, minor: Int)? = nil,
sortKeys: Bool = false,
sequenceStyle: Node.Sequence.Style = .any,
mappingStyle: Node.Mapping.Style = .any) throws -> String
where Nodes: Sequence, Nodes.Iterator.Element == Node {
let emitter = Emitter(
canonical: canonical,
indent: indent,
width: width,
allowUnicode: allowUnicode,
lineBreak: lineBreak,
explicitStart: explicitStart,
explicitEnd: explicitEnd,
version: version,
sortKeys: sortKeys,
sequenceStyle: sequenceStyle,
mappingStyle: mappingStyle
)
try emitter.open()
try nodes.forEach(emitter.serialize)
try emitter.close()
return String(data: emitter.data, encoding: .utf8)!
}
/// Produce a YAML string from a `Node`.
///
/// - parameter node: `Node`.
/// - parameter canonical: Output should be the "canonical" format as in the YAML specification.
/// - parameter indent: The indentation increment.
/// - parameter width: The preferred line width. @c -1 means unlimited.
/// - parameter allowUnicode: Unescaped non-ASCII characters are allowed if true.
/// - parameter lineBreak: Preferred line break.
/// - parameter explicitStart: Explicit document start `---`.
/// - parameter explicitEnd: Explicit document end `...`.
/// - parameter version: YAML version directive.
/// - parameter sortKeys: Whether or not to sort Mapping keys in lexicographic order.
/// - parameter sequenceStyle: The style for sequences (arrays / lists)
/// - parameter mappingStyle: The style for mappings (dictionaries)
///
/// - returns: YAML string.
///
/// - throws: `YamlError`.
public func serialize(
node: Node,
canonical: Bool = false,
indent: Int = 0,
width: Int = 0,
allowUnicode: Bool = false,
lineBreak: Emitter.LineBreak = .ln,
explicitStart: Bool = false,
explicitEnd: Bool = false,
version: (major: Int, minor: Int)? = nil,
sortKeys: Bool = false,
sequenceStyle: Node.Sequence.Style = .any,
mappingStyle: Node.Mapping.Style = .any) throws -> String {
return try serialize(
nodes: [node],
canonical: canonical,
indent: indent,
width: width,
allowUnicode: allowUnicode,
lineBreak: lineBreak,
explicitStart: explicitStart,
explicitEnd: explicitEnd,
version: version,
sortKeys: sortKeys,
sequenceStyle: sequenceStyle,
mappingStyle: mappingStyle
)
}
/// Class responsible for emitting libYAML events.
public final class Emitter {
/// Line break options to use when emitting YAML.
public enum LineBreak {
/// Use CR for line breaks (Mac style).
case cr
/// Use LN for line breaks (Unix style).
case ln
/// Use CR LN for line breaks (DOS style).
case crln
}
/// Retrieve this Emitter's binary output.
public internal(set) var data = Data()
/// Configuration options to use when emitting YAML.
public struct Options {
/// Set if the output should be in the "canonical" format described in the YAML specification.
public var canonical: Bool = false
/// Set the indentation value.
public var indent: Int = 0
/// Set the preferred line width. -1 means unlimited.
public var width: Int = 0
/// Set if unescaped non-ASCII characters are allowed.
public var allowUnicode: Bool = false
/// Set the preferred line break.
public var lineBreak: LineBreak = .ln
// internal since we don't know if these should be exposed.
var explicitStart: Bool = false
var explicitEnd: Bool = false
/// The `%YAML` directive value or nil.
public var version: (major: Int, minor: Int)?
/// Set if emitter should sort keys in lexicographic order.
public var sortKeys: Bool = false
/// Set the style for sequences (arrays / lists)
public var sequenceStyle: Node.Sequence.Style = .any
/// Set the style for mappings (dictionaries)
public var mappingStyle: Node.Mapping.Style = .any
}
/// Configuration options to use when emitting YAML.
public var options: Options {
didSet {
applyOptionsToEmitter()
}
}
/// Create an `Emitter` with the specified options.
///
/// - parameter canonical: Set if the output should be in the "canonical" format described in the YAML
/// specification.
/// - parameter indent: Set the indentation value.
/// - parameter width: Set the preferred line width. -1 means unlimited.
/// - parameter allowUnicode: Set if unescaped non-ASCII characters are allowed.
/// - parameter lineBreak: Set the preferred line break.
/// - parameter explicitStart: Explicit document start `---`.
/// - parameter explicitEnd: Explicit document end `...`.
/// - parameter version: The `%YAML` directive value or nil.
/// - parameter sortKeys: Set if emitter should sort keys in lexicographic order.
/// - parameter sequenceStyle: Set the style for sequences (arrays / lists)
/// - parameter mappingStyle: Set the style for mappings (dictionaries)
public init(canonical: Bool = false,
indent: Int = 0,
width: Int = 0,
allowUnicode: Bool = false,
lineBreak: LineBreak = .ln,
explicitStart: Bool = false,
explicitEnd: Bool = false,
version: (major: Int, minor: Int)? = nil,
sortKeys: Bool = false,
sequenceStyle: Node.Sequence.Style = .any,
mappingStyle: Node.Mapping.Style = .any) {
options = Options(canonical: canonical,
indent: indent,
width: width,
allowUnicode: allowUnicode,
lineBreak: lineBreak,
explicitStart: explicitStart,
explicitEnd: explicitEnd,
version: version,
sortKeys: sortKeys,
sequenceStyle: sequenceStyle,
mappingStyle: mappingStyle)
// configure emitter
yaml_emitter_initialize(&emitter)
yaml_emitter_set_output(&self.emitter, { pointer, buffer, size in
guard let buffer = buffer else { return 0 }
let emitter = unsafeBitCast(pointer, to: Emitter.self)
emitter.data.append(buffer, count: size)
return 1
}, unsafeBitCast(self, to: UnsafeMutableRawPointer.self))
applyOptionsToEmitter()
yaml_emitter_set_encoding(&emitter, YAML_UTF8_ENCODING)
}
deinit {
yaml_emitter_delete(&emitter)
}
/// Open & initialize the emitter.
///
/// - throws: `YamlError` if the `Emitter` was already opened or closed.
public func open() throws {
switch state {
case .initialized:
var event = yaml_event_t()
yaml_stream_start_event_initialize(&event, YAML_UTF8_ENCODING)
try emit(&event)
state = .opened
case .opened:
throw YamlError.emitter(problem: "serializer is already opened")
case .closed:
throw YamlError.emitter(problem: "serializer is closed")
}
}
/// Close the `Emitter.`
///
/// - throws: `YamlError` if the `Emitter` hasn't yet been initialized.
public func close() throws {
switch state {
case .initialized:
throw YamlError.emitter(problem: "serializer is not opened")
case .opened:
var event = yaml_event_t()
yaml_stream_end_event_initialize(&event)
try emit(&event)
state = .closed
case .closed:
break // do nothing
}
}
/// Ingest a `Node` to include when emitting the YAML output.
///
/// - parameter node: The `Node` to serialize.
///
/// - throws: `YamlError` if the `Emitter` hasn't yet been opened or has been closed.
public func serialize(node: Node) throws {
switch state {
case .initialized:
throw YamlError.emitter(problem: "serializer is not opened")
case .opened:
break
case .closed:
throw YamlError.emitter(problem: "serializer is closed")
}
var event = yaml_event_t()
if let (major, minor) = options.version {
var versionDirective = yaml_version_directive_t(major: Int32(major), minor: Int32(minor))
// TODO: Support tags
yaml_document_start_event_initialize(&event, &versionDirective, nil, nil, options.explicitStart ? 0 : 1)
} else {
// TODO: Support tags
yaml_document_start_event_initialize(&event, nil, nil, nil, options.explicitStart ? 0 : 1)
}
try emit(&event)
try serializeNode(node)
yaml_document_end_event_initialize(&event, options.explicitEnd ? 0 : 1)
try emit(&event)
}
// MARK: Private
private var emitter = yaml_emitter_t()
private enum State { case initialized, opened, closed }
private var state: State = .initialized
private func applyOptionsToEmitter() {
yaml_emitter_set_canonical(&emitter, options.canonical ? 1 : 0)
yaml_emitter_set_indent(&emitter, Int32(options.indent))
yaml_emitter_set_width(&emitter, Int32(options.width))
yaml_emitter_set_unicode(&emitter, options.allowUnicode ? 1 : 0)
switch options.lineBreak {
case .cr: yaml_emitter_set_break(&emitter, YAML_CR_BREAK)
case .ln: yaml_emitter_set_break(&emitter, YAML_LN_BREAK)
case .crln: yaml_emitter_set_break(&emitter, YAML_CRLN_BREAK)
}
}
}
// MARK: - Options Initializer
extension Emitter.Options {
/// Create `Emitter.Options` with the specified values.
///
/// - parameter canonical: Set if the output should be in the "canonical" format described in the YAML
/// specification.
/// - parameter indent: Set the indentation value.
/// - parameter width: Set the preferred line width. -1 means unlimited.
/// - parameter allowUnicode: Set if unescaped non-ASCII characters are allowed.
/// - parameter lineBreak: Set the preferred line break.
/// - parameter explicitStart: Explicit document start `---`.
/// - parameter explicitEnd: Explicit document end `...`.
/// - parameter version: The `%YAML` directive value or nil.
/// - parameter sortKeys: Set if emitter should sort keys in lexicographic order.
/// - parameter sequenceStyle: Set the style for sequences (arrays / lists)
/// - parameter mappingStyle: Set the style for mappings (dictionaries)
public init(canonical: Bool = false, indent: Int = 0, width: Int = 0, allowUnicode: Bool = false,
lineBreak: Emitter.LineBreak = .ln, version: (major: Int, minor: Int)? = nil,
sortKeys: Bool = false, sequenceStyle: Node.Sequence.Style = .any,
mappingStyle: Node.Mapping.Style = .any) {
self.canonical = canonical
self.indent = indent
self.width = width
self.allowUnicode = allowUnicode
self.lineBreak = lineBreak
self.version = version
self.sortKeys = sortKeys
self.sequenceStyle = sequenceStyle
self.mappingStyle = mappingStyle
}
}
// MARK: Implementation Details
extension Emitter {
private func emit(_ event: UnsafeMutablePointer<yaml_event_t>) throws {
guard yaml_emitter_emit(&emitter, event) == 1 else {
throw YamlError(from: emitter)
}
}
private func serializeNode(_ node: Node) throws {
switch node {
case .scalar(let scalar): try serializeScalar(scalar)
case .sequence(let sequence): try serializeSequence(sequence)
case .mapping(let mapping): try serializeMapping(mapping)
}
}
private func serializeScalar(_ scalar: Node.Scalar) throws {
var value = scalar.string.utf8CString, tag = scalar.resolvedTag.name.rawValue.utf8CString
let scalarStyle = yaml_scalar_style_t(rawValue: numericCast(scalar.style.rawValue))
var event = yaml_event_t()
_ = value.withUnsafeMutableBytes { value in
tag.withUnsafeMutableBytes { tag in
yaml_scalar_event_initialize(
&event,
nil,
tag.baseAddress?.assumingMemoryBound(to: UInt8.self),
value.baseAddress?.assumingMemoryBound(to: UInt8.self),
Int32(value.count - 1),
1,
1,
scalarStyle)
}
}
try emit(&event)
}
private func serializeSequence(_ sequence: Node.Sequence) throws {
var tag = sequence.resolvedTag.name.rawValue.utf8CString
let implicit: Int32 = sequence.tag.name == .seq ? 1 : 0
let sequenceStyle = yaml_sequence_style_t(rawValue: numericCast(sequence.style.rawValue))
var event = yaml_event_t()
_ = tag.withUnsafeMutableBytes { tag in
yaml_sequence_start_event_initialize(
&event,
nil,
tag.baseAddress?.assumingMemoryBound(to: UInt8.self),
implicit,
sequenceStyle)
}
try emit(&event)
try sequence.forEach(self.serializeNode)
yaml_sequence_end_event_initialize(&event)
try emit(&event)
}
private func serializeMapping(_ mapping: Node.Mapping) throws {
var tag = mapping.resolvedTag.name.rawValue.utf8CString
let implicit: Int32 = mapping.tag.name == .map ? 1 : 0
let mappingStyle = yaml_mapping_style_t(rawValue: numericCast(mapping.style.rawValue))
var event = yaml_event_t()
_ = tag.withUnsafeMutableBytes { tag in
yaml_mapping_start_event_initialize(
&event,
nil,
tag.baseAddress?.assumingMemoryBound(to: UInt8.self),
implicit,
mappingStyle)
}
try emit(&event)
if options.sortKeys {
try mapping.keys.sorted().forEach {
try self.serializeNode($0)
try self.serializeNode(mapping[$0]!) // swiftlint:disable:this force_unwrapping
}
} else {
try mapping.forEach {
try self.serializeNode($0.key)
try self.serializeNode($0.value)
}
}
yaml_mapping_end_event_initialize(&event)
try emit(&event)
}
}
// swiftlint:disable:this file_length

View File

@ -1,296 +0,0 @@
//
// Encoder.swift
// Yams
//
// Created by Norio Nomura on 5/2/17.
// Copyright (c) 2017 Yams. All rights reserved.
//
/// `Codable`-style `Encoder` that can be used to encode an `Encodable` type to a YAML string using optional
/// user info mapping. Similar to `Foundation.JSONEncoder`.
public class YAMLEncoder {
/// Options to use when encoding to YAML.
public typealias Options = Emitter.Options
/// Options to use when encoding to YAML.
public var options = Options()
/// Creates a `YAMLEncoder` instance.
public init() {}
/// Encode a value of type `T` to a YAML string.
///
/// - parameter value: Value to encode.
/// - parameter userInfo: Additional key/values which can be used when looking up keys to encode.
///
/// - returns: The YAML string.
///
/// - throws: `EncodingError` if something went wrong while encoding.
public func encode<T: Swift.Encodable>(_ value: T, userInfo: [CodingUserInfoKey: Any] = [:]) throws -> String {
do {
let encoder = _Encoder(userInfo: userInfo, sequenceStyle: options.sequenceStyle,
mappingStyle: options.mappingStyle)
var container = encoder.singleValueContainer()
try container.encode(value)
return try serialize(node: encoder.node, options: options)
} catch let error as EncodingError {
throw error
} catch {
let description = "Unable to encode the given top-level value to YAML."
let context = EncodingError.Context(codingPath: [],
debugDescription: description,
underlyingError: error)
throw EncodingError.invalidValue(value, context)
}
}
}
private class _Encoder: Swift.Encoder {
var node: Node = .unused
init(userInfo: [CodingUserInfoKey: Any] = [:], codingPath: [CodingKey] = [], sequenceStyle: Node.Sequence.Style,
mappingStyle: Node.Mapping.Style) {
self.userInfo = userInfo
self.codingPath = codingPath
self.sequenceStyle = sequenceStyle
self.mappingStyle = mappingStyle
}
// MARK: - Swift.Encoder Methods
let codingPath: [CodingKey]
let userInfo: [CodingUserInfoKey: Any]
let sequenceStyle: Node.Sequence.Style
let mappingStyle: Node.Mapping.Style
func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> {
if canEncodeNewValue {
node = Node([(Node, Node)](), .implicit, mappingStyle)
} else {
precondition(
node.isMapping,
"Attempt to push new keyed encoding container when already previously encoded at this path."
)
}
return .init(_KeyedEncodingContainer<Key>(referencing: self))
}
func unkeyedContainer() -> UnkeyedEncodingContainer {
if canEncodeNewValue {
node = Node([], .implicit, sequenceStyle)
} else {
precondition(
node.isSequence,
"Attempt to push new keyed encoding container when already previously encoded at this path."
)
}
return _UnkeyedEncodingContainer(referencing: self)
}
func singleValueContainer() -> SingleValueEncodingContainer { return self }
// MARK: -
var mapping: Node.Mapping {
get { return node.mapping ?? [:] }
set { node.mapping = newValue }
}
var sequence: Node.Sequence {
get { return node.sequence ?? [] }
set { node.sequence = newValue }
}
/// create a new `_ReferencingEncoder` instance as `key` inheriting `userInfo`
func encoder(for key: CodingKey) -> _ReferencingEncoder {
return .init(referencing: self, key: key)
}
/// create a new `_ReferencingEncoder` instance at `index` inheriting `userInfo`
func encoder(at index: Int) -> _ReferencingEncoder {
return .init(referencing: self, at: index)
}
private var canEncodeNewValue: Bool { return node == .unused }
}
private class _ReferencingEncoder: _Encoder {
private enum Reference { case mapping(String), sequence(Int) }
private let encoder: _Encoder
private let reference: Reference
init(referencing encoder: _Encoder, key: CodingKey) {
self.encoder = encoder
reference = .mapping(key.stringValue)
super.init(userInfo: encoder.userInfo, codingPath: encoder.codingPath + [key],
sequenceStyle: encoder.sequenceStyle, mappingStyle: encoder.mappingStyle)
}
init(referencing encoder: _Encoder, at index: Int) {
self.encoder = encoder
reference = .sequence(index)
super.init(userInfo: encoder.userInfo, codingPath: encoder.codingPath + [_YAMLCodingKey(index: index)],
sequenceStyle: encoder.sequenceStyle, mappingStyle: encoder.mappingStyle)
}
deinit {
switch reference {
case .mapping(let key):
encoder.node[key] = node
case .sequence(let index):
encoder.node[index] = node
}
}
}
private struct _KeyedEncodingContainer<Key: CodingKey>: KeyedEncodingContainerProtocol {
private let encoder: _Encoder
init(referencing encoder: _Encoder) {
self.encoder = encoder
}
// MARK: - Swift.KeyedEncodingContainerProtocol Methods
var codingPath: [CodingKey] { return encoder.codingPath }
func encodeNil(forKey key: Key) throws { encoder.mapping[key.stringValue] = .null }
func encode<T>(_ value: T, forKey key: Key) throws where T: YAMLEncodable { try encoder(for: key).encode(value) }
func encode<T>(_ value: T, forKey key: Key) throws where T: Encodable { try encoder(for: key).encode(value) }
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type,
forKey key: Key) -> KeyedEncodingContainer<NestedKey> {
return encoder(for: key).container(keyedBy: type)
}
func nestedUnkeyedContainer(forKey key: Key) -> UnkeyedEncodingContainer {
return encoder(for: key).unkeyedContainer()
}
func superEncoder() -> Encoder { return encoder(for: _YAMLCodingKey.super) }
func superEncoder(forKey key: Key) -> Encoder { return encoder(for: key) }
// MARK: -
private func encoder(for key: CodingKey) -> _ReferencingEncoder { return encoder.encoder(for: key) }
}
private struct _UnkeyedEncodingContainer: UnkeyedEncodingContainer {
private let encoder: _Encoder
init(referencing encoder: _Encoder) {
self.encoder = encoder
}
// MARK: - Swift.UnkeyedEncodingContainer Methods
var codingPath: [CodingKey] { return encoder.codingPath }
var count: Int { return encoder.sequence.count }
func encodeNil() throws { encoder.sequence.append(.null) }
func encode<T>(_ value: T) throws where T: YAMLEncodable { try currentEncoder.encode(value) }
func encode<T>(_ value: T) throws where T: Encodable { try currentEncoder.encode(value) }
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type) -> KeyedEncodingContainer<NestedKey> {
return currentEncoder.container(keyedBy: type)
}
func nestedUnkeyedContainer() -> UnkeyedEncodingContainer { return currentEncoder.unkeyedContainer() }
func superEncoder() -> Encoder { return currentEncoder }
// MARK: -
private var currentEncoder: _ReferencingEncoder {
defer { encoder.sequence.append("") }
return encoder.encoder(at: count)
}
}
extension _Encoder: SingleValueEncodingContainer {
// MARK: - Swift.SingleValueEncodingContainer Methods
func encodeNil() throws {
assertCanEncodeNewValue()
node = .null
}
func encode<T>(_ value: T) throws where T: YAMLEncodable {
assertCanEncodeNewValue()
node = value.box()
}
func encode<T>(_ value: T) throws where T: Encodable {
assertCanEncodeNewValue()
if let encodable = value as? YAMLEncodable {
node = encodable.box()
} else {
try value.encode(to: self)
}
}
// MARK: -
/// Asserts that a single value can be encoded at the current coding path
/// (i.e. that one has not already been encoded through this container).
/// `preconditionFailure()`s if one cannot be encoded.
private func assertCanEncodeNewValue() {
precondition(
canEncodeNewValue,
"Attempt to encode value through single value container when previously value already encoded."
)
}
}
// MARK: - CodingKey for `_UnkeyedEncodingContainer`, `_UnkeyedDecodingContainer`, `superEncoder` and `superDecoder`
struct _YAMLCodingKey: CodingKey { // swiftlint:disable:this type_name
var stringValue: String
var intValue: Int?
init?(stringValue: String) {
self.stringValue = stringValue
self.intValue = nil
}
init?(intValue: Int) {
self.stringValue = "\(intValue)"
self.intValue = intValue
}
init(index: Int) {
self.stringValue = "Index \(index)"
self.intValue = index
}
static let `super` = _YAMLCodingKey(stringValue: "super")!
}
// MARK: -
private extension Node {
static let null = Node("null", Tag(.null))
static let unused = Node("", .unused)
}
private extension Tag {
static let unused = Tag(.unused)
}
private extension Tag.Name {
static let unused: Tag.Name = "tag:yams.encoder:unused"
}
private func serialize(node: Node, options: Emitter.Options) throws -> String {
return try serialize(
nodes: [node],
canonical: options.canonical,
indent: options.indent,
width: options.width,
allowUnicode: options.allowUnicode,
lineBreak: options.lineBreak,
explicitStart: options.explicitStart,
explicitEnd: options.explicitEnd,
version: options.version,
sortKeys: options.sortKeys)
}

View File

@ -1,39 +0,0 @@
//
// Mark.swift
// Yams
//
// Created by Norio Nomura on 4/11/17.
// Copyright (c) 2017 Yams. All rights reserved.
//
/// The pointer position.
public struct Mark {
/// Line number starting from 1.
public let line: Int
/// Column number starting from 1. libYAML counts columns in `UnicodeScalar`.
public let column: Int
}
// MARK: - CustomStringConvertible Conformance
extension Mark: CustomStringConvertible {
/// A textual representation of this instance.
public var description: String { return "\(line):\(column)" }
}
// MARK: Snippet
extension Mark {
/// Returns snippet string pointed by Mark instance from YAML String.
public func snippet(from yaml: String) -> String {
let contents = yaml.substring(at: line - 1)
let columnIndex = contents.unicodeScalars
.index(contents.unicodeScalars.startIndex,
offsetBy: column - 1,
limitedBy: contents.unicodeScalars.endIndex)?
.samePosition(in: contents.utf16) ?? contents.utf16.endIndex
let columnInUTF16 = contents.utf16.distance(from: contents.utf16.startIndex, to: columnIndex)
return contents.endingWithNewLine +
String(repeating: " ", count: columnInUTF16) + "^"
}
}

Some files were not shown because too many files have changed in this diff Show More