Encoder

extension Encoder
  • Accesses the previously-injected encoding state of type T.

    Precondition

    self is the product of some StatefulEncoder e on which e.setState(s) has been called, where s has type T.

    Declaration

    Swift

    public subscript<T>(state state: T.Type) -> T where T : Sendable { get nonmutating set }