setCompleted

fun setCompleted(error: Throwable?)

Should be called by the mechanism when the transaction is complete.

This moves the model into the State.Completed state.

Parameters

error

if the transaction fails, this should be set to a non-null value.