AnyTradableTweak

public protocol AnyTradableTweak : AnyTweak

A type-erased tweak that can be traded.

  • Converts the trade value to raw data.

    Declaration

    Swift

    func rawData(from value: TweakTradeValue) -> Result<Data, TweakError>

    Parameters

    value

    The trade value.

    Return Value

    The conversion result. The Success type is Data and the Failure type is TweakError.

  • Converts current value of the tweak to trade value.

    Declaration

    Swift

    func tradeValue() -> TweakTradeValue

    Return Value

    The trade value.

  • addExportPreset(_:) Extension method

    Adds the tweak in an export preset.

    Tweaks are grouped in the same preset when exporting.

    Declaration

    Swift

    @discardableResult
    public func addExportPreset(_ preset: String) -> Self

    Parameters

    preset

    The name of the export preset.

    Return Value

    The current tweak.

  • Tells the tweak that imported value should override the manually changed value.

    Users can still import new value of the tweak.

    Declaration

    Swift

    @discardableResult
    public func setImportedValueTrumpsManuallyChangedValue() -> Self

    Return Value

    The current tweak.