AnyArchivable
public protocol AnyArchivable : ObjectType
任意可归档对象协议,兼容UserDefaults | Cache | Database | Keychain | Codable | CodableModel | JSONModel使用
-
将Data数据解码为对象,不调用NSKeyedUnarchiver
Declaration
Swift
static func archiveDecode(_ data: Data?) -> Self?
-
archiveDecodeSafe(_:
Default implementation) 将Data数据解码为安全对象,不调用NSKeyedUnarchiver
Default Implementation
默认实现将Data数据解码为安全对象,不调用NSKeyedUnarchiver
Declaration
Swift
static func archiveDecodeSafe(_ data: Data?) -> Self
-
将对象编码为Data数据,不调用NSKeyedArchiver
Declaration
Swift
func archiveEncode() -> Data?
-
archiveDecode(_:
Default implementation) Default Implementation
默认实现将Data数据解码为对象,不调用NSKeyedUnarchiver
Declaration
Swift
public static func archiveDecode(_ data: Data?) -> Self?
-
archiveEncode()
Default implementationDefault Implementation
默认实现将对象编码为Data数据,不调用NSKeyedArchiver
Declaration
Swift
public func archiveEncode() -> Data?