ValidatedValue
@propertyWrapper
public class ValidatedValue<Value>
extension ValidatedValue: JSONMappedValue
ValidatedValue属性包装器注解,默认为手工指定或初始值
使用示例: @ValidatedValue(.isEmail) var email: String = “”
-
Undocumented
Declaration
Swift
public init( wrappedValue: Value, _ validator: Validator<Value>, defaultValue: Value? = nil )
-
Undocumented
Declaration
Swift
public convenience init<WrappedValue>( wrappedValue: WrappedValue? = nil, _ validator: Validator<WrappedValue>, defaultValue: Value? = nil ) where WrappedValue? == Value
-
Undocumented
Declaration
Swift
public var wrappedValue: Value { get set }
-
Undocumented
Declaration
Swift
public func mappingKeys() -> [String]?
-
Undocumented
Declaration
Swift
public func mappingValue() -> Any
-
Undocumented
Declaration
Swift
public func mappingValue(_ value: Any)