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
valueThe trade value.
Return Value
The conversion result. The
Successtype isDataand theFailuretype isTweakError. -
Converts current value of the tweak to trade value.
Declaration
Swift
func tradeValue() -> TweakTradeValueReturn 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) -> SelfParameters
presetThe name of the export preset.
Return Value
The current tweak.
-
setImportedValueTrumpsManuallyChangedValue()Extension methodTells 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() -> SelfReturn Value
The current tweak.
View on GitHub
AnyTradableTweak Protocol Reference