SingleK

public final class SingleK<A> : SingleKOf<A>

SingleK is a Higher Kinded Type wrapper over RxSwift’s SingleK data type.

  • Wrapped Single value.

    Declaration

    Swift

    public let value: Single<A>
  • Safe downcast.

    Declaration

    Swift

    public static func fix(_ value: SingleKOf<A>) -> SingleK<A>

    Parameters

    value

    Value in the higher-kind form.

    Return Value

    Value cast to SingleK.

  • Creates a SingleK from the result of evaluating a function, suspending its execution.

    Declaration

    Swift

    public static func from(_ fa: @escaping () throws -> A) -> SingleK<A>

    Parameters

    fa

    Function providing the value to be provided in the underlying Single.

    Return Value

    A SingleK that provides the value obtained from the closure.

  • Creates a SingleK from the result of evaluating a function, suspending its execution.

    Declaration

    Swift

    public static func invoke(_ fa: @escaping () throws -> SingleKOf<A>) -> SingleK<A>

    Parameters

    fa

    Function providing the value to be provided in the underlying Single.

    Return Value

    A SingleK that provides the value obtained from the closure.

  • Initializes a value of this type with the underlying Single value.

    Declaration

    Swift

    public init(_ value: Single<A>)

    Parameters

    value

    Wrapped Single value.