We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed70841 commit 68d48d6Copy full SHA for 68d48d6
Sources/OpenGraph/Tree/TreeElement.swift
@@ -0,0 +1,28 @@
1
+//
2
+// TreeElement.swift
3
+// OpenGraph
4
+
5
+public import OpenGraphCxx
6
7
+extension TreeElement {
8
+ public var value: AnyAttribute? {
9
+ let result = __OGTreeElementGetValue(self)
10
+ return result == .nil ? nil : result
11
+ }
12
+}
13
14
+extension Nodes: @retroactive IteratorProtocol {
15
+ public typealias Element = AnyAttribute
16
+ public mutating func next() -> AnyAttribute? {
17
+ let result = __OGTreeElementGetNextNode(&self)
18
19
20
21
22
+extension Children: @retroactive IteratorProtocol {
23
+ public typealias Element = TreeElement
24
25
26
+extension Values: @retroactive IteratorProtocol {
27
+ public typealias Element = TreeValue
28
0 commit comments