Add remove field functions
This commit is contained in:
parent
ba6a46f793
commit
682947abb0
@ -67,6 +67,13 @@ public actor SceneStorage {
|
||||
fields[key] = value
|
||||
}
|
||||
|
||||
/// Remove a certain field.
|
||||
/// - Parameters:
|
||||
/// - key: The key.
|
||||
public func removeField(key: String) {
|
||||
fields.removeValue(forKey: key)
|
||||
}
|
||||
|
||||
/// Get the element of a certain field.
|
||||
/// - Parameter key: The key.
|
||||
/// - Returns: The field.
|
||||
|
||||
@ -94,6 +94,13 @@ public actor ViewStorage: Sendable {
|
||||
fields[key] = value
|
||||
}
|
||||
|
||||
/// Remove a certain field.
|
||||
/// - Parameters:
|
||||
/// - key: The key.
|
||||
public func removeField(key: String) {
|
||||
fields.removeValue(forKey: key)
|
||||
}
|
||||
|
||||
/// Get the element of a certain field.
|
||||
/// - Parameter key: The key.
|
||||
/// - Returns: The field.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user