All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.jupyter.repl.result.EvalResultEx.kt Maven / Gradle / Ivy

Go to download

Implementation of REPL compiler and preprocessor for Jupyter dialect of Kotlin (IDE-compatible)

There is a newer version: 0.12.0-290
Show newest version
package org.jetbrains.kotlinx.jupyter.repl.result

import org.jetbrains.kotlinx.jupyter.api.DisplayResult
import org.jetbrains.kotlinx.jupyter.repl.EvaluatedSnippetMetadata

sealed interface EvalResultEx {
    val metadata: EvaluatedSnippetMetadata

    data class Success(
        val internalResult: InternalEvalResult,
        val renderedValue: Any?,
        val displayValue: DisplayResult?,
        override val metadata: EvaluatedSnippetMetadata,
    ) : EvalResultEx

    sealed interface AbstractError : EvalResultEx {
        val error: Throwable
    }

    data class Error(
        override val error: Throwable,
        override val metadata: EvaluatedSnippetMetadata,
    ) : AbstractError

    data class RenderedError(
        override val error: Throwable,
        val renderedError: Any?,
        val displayError: DisplayResult?,
        override val metadata: EvaluatedSnippetMetadata,
    ) : AbstractError

    data class Interrupted(
        override val metadata: EvaluatedSnippetMetadata,
    ) : EvalResultEx
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy