LossyArray

@propertyWrapper
public struct LossyArray<T>
extension LossyArray: Decodable where T: Decodable
extension LossyArray: Encodable where T: Encodable
extension LossyArray: Equatable where T: Equatable
extension LossyArray: Hashable where T: Hashable

Decodes Arrays filtering invalid values if applicable

@LossyArray decodes Arrays and filters invalid values if the Decoder is unable to decode the value.

This is useful if the Array is intended to contain non-optional types.

  • Undocumented

    Declaration

    Swift

    public var wrappedValue: [T]
  • Undocumented

    Declaration

    Swift

    public init(wrappedValue: [T])

Available where T: Decodable

  • Declaration

    Swift

    public init(from decoder: Decoder) throws

Available where T: Encodable

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws