CachedValue
@propertyWrapper
public struct CachedValue<Value>
缓存属性包装器注解,默认为手工指定或初始值
使用示例: @CachedValue(“cacheKey”) static var cacheValue: String = “”
-
Undocumented
Declaration
Swift
public init( wrappedValue: Value, _ key: String, defaultValue: Value? = nil, type: CacheType = .default )
-
Undocumented
Declaration
Swift
public init<WrappedValue>( wrappedValue: WrappedValue? = nil, _ key: String, defaultValue: Value? = nil, type: CacheType = .default ) where WrappedValue? == Value
-
Undocumented
Declaration
Swift
public var wrappedValue: Value { get set }