Files
sing-box-for-apple/ApplicationLibrary/Views/Groups/OutboundGroup.swift
T
2023-08-04 21:23:07 +08:00

27 lines
603 B
Swift

import Foundation
import Libbox
import SwiftUI
public struct OutboundGroup: Codable {
let tag: String
let type: String
var selected: String
let selectable: Bool
let items: [OutboundGroupItem]
var hashValue: Int {
var value = tag.hashValue
(value, _) = value.addingReportingOverflow(selected.hashValue)
for item in items {
(value, _) = value.addingReportingOverflow(item.urlTestTime.hashValue)
}
return value
}
}
public extension OutboundGroup {
var displayType: String {
LibboxProxyDisplayType(type)
}
}