AttestationValue

sealed class AttestationValue<out A : Asn1Encodable<*>> : AuthorizationList.Tagged.WithTag<Asn1Element> , PrettyPrintable(source)

Either type containing:

Parameters

A

the type of the parsed Asn1Encodable

See also

Asn1Element

Inheritors

Types

Link copied to clipboard
class Failure<E : Asn1Element> : AttestationValue<Asn1Encodable<*>>
Link copied to clipboard
data class Success<out T : Asn1Encodable<*>> : AttestationValue<T>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract 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
abstract 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: (A) -> R, onFailure: (String, AuthorizationList.Tagged, Asn1Element) -> R): R
Link copied to clipboard
inline fun get(): A
Link copied to clipboard
fun getOrNull(): A?

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

Link copied to clipboard
fun getOrThrow(): A

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: (A) -> R): R?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun toKmmResult(): KmmResult<A>

KmmResult version of toResult

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

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

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