Skip to content

ProxiedRuntimeModifiable

0x41c edited this page Feb 28, 2022 · 1 revision

ProxiedRuntimeModifiable

A structure that takes any other structure and allows the dynamic get/set of it's stored properties

@dynamicMemberLookup
struct ProxiedRuntimeModifiable<T>: AnyRuntimeModifiable 

Inheritance

AnyRuntimeModifiable

Properties

value

var value: T

allKeyPaths

All the keypaths belonging to the structure.

var allKeyPaths: [String: PartialKeyPath<T>] 

Every variable marked with let or var wil be included in this list. However, computed variables are not on the list as the API retreiving them doesn't have enough metadata to do so.

writableKeyPaths

All the writable key paths belonging to the structure

var writableKeyPaths: [String: PartialKeyPath<T>] 

A filtered version of allKeyPaths that only includes ones that are castable to WritableKeyPath. This directly corelates to the vars defined on the structure.

readOnlyKeyPaths

All the read only keypaths belonging to the structure

var readOnlyKeyPaths: [String: PartialKeyPath<T>] 

A filtered version of allKeyPaths that only includes ones that aren't castable to WritableKeyPath. This directly corelates to the lets defined on the structure.

Methods

get(_:_:)

func get<MemberType>(
        _ member: String,
        _ type: MemberType.Type? = nil
    ) -> MemberType? 

set(_:_:)

mutating func set<MemberType>(
        _ member: String,
        _ newValue: MemberType
    ) 
Types
Protocols
Global Typealiases
Global Functions
Clone this wiki locally