Wrapper

@MainActor
@dynamicMemberLookup
@frozen
public struct Wrapper

A wrapper of the underlying observable object that can create bindings to its properties using dynamic member lookup.

  • Returns a binding to the resulting value of a given key path.

    Declaration

    Swift

    public subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> { get }

    Parameters

    keyPath

    A key path to a specific resulting value.

    Return Value

    A new binding.

  • Returns a binding to the resulting equatable value of a given key path.

    This binding’s set() will only perform a write if the new value is different from the existing value.

    Declaration

    Swift

    public subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> where Subject : Equatable { get }

    Parameters

    keyPath

    A key path to a specific resulting value.

    Return Value

    A new binding.

  • Returns a binding to the resulting collection value of a given key path.

    Declaration

    Swift

    public subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> where Subject : RLMSwiftCollectionBase, Subject : ThreadConfined { get }

    Parameters

    keyPath

    A key path to a specific resulting value.

    Return Value

    A new binding.