mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
22 lines
415 B
Swift
22 lines
415 B
Swift
import BaseTinyPublic
|
|
|
|
@frozen
|
|
public enum CommonHandler {
|
|
case action(UserInterfaceAction)
|
|
case block(Action)
|
|
}
|
|
|
|
extension CommonHandler: Equatable {
|
|
public static func ==(
|
|
lhs: CommonHandler,
|
|
rhs: CommonHandler
|
|
) -> Bool {
|
|
switch (lhs, rhs) {
|
|
case let (.action(lAction), .action(rAction)):
|
|
return lAction == rAction
|
|
case (.action, _), (.block, _):
|
|
return false
|
|
}
|
|
}
|
|
}
|