String
extension String: ScalarConstructible
extension String: ScalarRepresentable
extension String: YAMLEncodable
-
Construct an instance of
String
, if possible, from the specified scalar.Declaration
Swift
public static func construct(from scalar: Node.Scalar) -> String?
Parameters
scalar
The
Node.Scalar
from which to extract a value of typeString
, if possible.Return Value
An instance of
String
, if one was successfully extracted from the scalar. -
Construct an instance of
String
, if possible, from the specifiedNode
.Declaration
Swift
public static func construct(from node: Node) -> String?
Parameters
node
The
Node
from which to extract a value of typeString
, if possible.Return Value
An instance of
String
, if one was successfully extracted from the node.
-
This value’s
Node.scalar
representation.Declaration
Swift
public func represented() -> Node.Scalar