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 type String, 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 specified Node.

    Declaration

    Swift

    public static func construct(from node: Node) -> String?

    Parameters

    node

    The Node from which to extract a value of type String, if possible.

    Return Value

    An instance of String, if one was successfully extracted from the node.

ScalarRepresentable