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