Instance Methodswift 6.0.1Swift
appending(path:)
Returns a new key path created by appending the given key path to this one.
func appending<Root, AppendedRoot, AppendedValue>(path: ReferenceWritableKeyPath<AppendedRoot, AppendedValue>) -> ReferenceWritableKeyPath<Root, AppendedValue>? where Self == PartialKeyPath<Root>
Parameters
- path
The reference writeable key path to append.
Returns
A key path from the root of this key path to the value type of path
, if path
can be appended. If path
can’t be appended, returns nil
.
Use this method to extend this key path to the value type of another key path. Appending the key path passed as path
is successful only if the root type for path
matches this key path’s value type.
Other members in extension
Instance members
func appending<Root, Value, AppendedValue>(path: ReferenceWritableKeyPath<Value, AppendedValue>
) -> ReferenceWritableKeyPath<Root, AppendedValue> Returns a new key path created by appending the given key path to this one.
func appending<Root, Value, AppendedValue>(path: ReferenceWritableKeyPath<Value, AppendedValue>
) -> ReferenceWritableKeyPath<Root, AppendedValue> Returns a new key path created by appending the given key path to this one.
func appending<Root, Value, AppendedValue>(path: WritableKeyPath<Value, AppendedValue>
) -> ReferenceWritableKeyPath<Root, AppendedValue> Returns a new key path created by appending the given key path to this one.
func appending<Root>(path: AnyKeyPath
) -> PartialKeyPath<Root>? Returns a new key path created by appending the given key path to this one.
func appending<Root, Value, AppendedValue>(path: WritableKeyPath<Value, AppendedValue>
) -> WritableKeyPath<Root, AppendedValue> Returns a new key path created by appending the given key path to this one.
func appending<Root, Value, AppendedValue>(path: KeyPath<Value, AppendedValue>
) -> KeyPath<Root, AppendedValue> Returns a new key path created by appending the given key path to this one.
func appending<Root, AppendedRoot, AppendedValue>(path: KeyPath<AppendedRoot, AppendedValue>
) -> KeyPath<Root, AppendedValue>? Returns a new key path created by appending the given key path to this one.