Structure
Attribute
@propertyWrapper
public struct Attribute<Value>: XMLAttributeProtocol
Property wrapper specifying that a given property should be encoded and decoded as an XML attribute.
For example, this type
struct Book: Codable {
@Attribute var id: Int
}
will encode value Book(id: 42) as <Book id="42"></Book>. And vice versa,
it will decode the former into the latter.
Relationships
Conforms To
CodableExpressibleByBooleanLiteralExpressibleByExtendedGraphemeClusterLiteralExpressibleByIntegerLiteralExpressibleByNilLiteralExpressibleByStringLiteralExpressibleByUnicodeScalarLiteral
Initializers
init(_:)
public init(_ wrappedValue: Value)
Properties
wrappedValue
public var wrappedValue: Value