Skip to content

Commit

Permalink
添加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
intsig171 committed Aug 15, 2024
1 parent 02952ba commit 7de0a0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SmartCodable/Classes/SmartType/IgnoredKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

import Foundation

/** IgnoredKey 使用注意
* 1. 并不是真正的忽略被修饰属性的解析,而是解析的时候忽略使用数据。
* 2. 是否有对应数据,不同的处理:
* - 有数据时候,会走进IgnoredKey的 `encode(to:)` 方法,抛出异常,让外部处理。
* - 没有数据时,不会进来,会被当前一个普通数据解析处理,走无数据时的兜底逻辑。
*/

@propertyWrapper
public struct IgnoredKey<T>: Codable {
public var wrappedValue: T
Expand Down

0 comments on commit 7de0a0d

Please sign in to comment.