Success

data class Success<out T : Asn1Encodable<*>> : AttestationValue<T> (source)

Properties

Link copied to clipboard
open override val tagged: AuthorizationList.Tagged
Link copied to clipboard
val value: T

Functions

Link copied to clipboard
open override fun doPrettyPrint(indent: String): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeToDerSafe(): KmmResult<ByteArray>
Link copied to clipboard
open override fun encodeToTlv(): Asn1Element
Link copied to clipboard
open fun encodeToTlvOrNull(): Asn1Element?
Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Element>
Link copied to clipboard

Returns the current instance as a Failure if it represents a failure state. If the instance is not a failure, null is returned.

Link copied to clipboard
inline fun <R> fold(onSuccess: (T) -> R, onFailure: (String, AuthorizationList.Tagged, Asn1Element) -> R): R
Link copied to clipboard
inline fun get(): T
Link copied to clipboard
fun getOrNull(): T?

Retrieves the encapsulated value if this instance is of type Success, or null otherwise.

Link copied to clipboard
fun getOrThrow(): T

Returns the encapsulated value if this instance is of type Success, otherwise throws a NoSuchElementException with details from Failure.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <R> onFailure(onFailure: (String, AuthorizationList.Tagged, Asn1Element) -> R): R?
Link copied to clipboard
inline fun <R> onSuccess(onSuccess: (T) -> R): R?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun toKmmResult(): KmmResult<T>

KmmResult version of toResult

Link copied to clipboard
fun toResult(): Result<T>

Converts this instance to a Result object wrapping the success value or failure exception, depending on the instance state.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open infix fun withImplicitTag(tag: Asn1Element.Tag): Asn1Element
open infix fun withImplicitTag(template: Asn1Element.Tag.Template): Asn1Element
open infix fun withImplicitTag(tagValue: ULong): Asn1Element