collapseToStart

abstract fun collapseToStart(onSuccess: (ContentLocation) -> Unit, onError: (ColibrioException) -> Unit)

If this ContentLocation represents a range, it creates a new ContentLocation by collapsing the locator to its start position. If this ContentLocation does not represent a range, it creates a new ContentLocation with the locator untouched.

If successful, onSuccess will be called with the result. Otherwise, onError is called.


If this ContentLocation represents a range, it creates a new ContentLocation by collapsing the locator to its start position. If this ContentLocation does not represent a range, it creates a new ContentLocation with the locator untouched.

Return

Either ColibrioResult.Success containing the created ContentLocation instance, or ColibrioResult.Error containing the error.