Data

extension Data: ScalarConstructible
extension Data: ScalarRepresentable
extension Data: YAMLEncodable
  • Construct an instance of Data, if possible, from the specified scalar.

    Declaration

    Swift

    public static func construct(from scalar: Node.Scalar) -> Data?

    Parameters

    scalar

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

    Return Value

    An instance of Data, if one was successfully extracted from the scalar.

ScalarRepresentable