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

org.jetbrains.kotlinx.jupyter.codegen.ResultsRenderersProcessor.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-333
Show newest version
package org.jetbrains.kotlinx.jupyter.codegen

import org.jetbrains.kotlinx.jupyter.api.Code
import org.jetbrains.kotlinx.jupyter.api.FieldValue
import org.jetbrains.kotlinx.jupyter.api.PrecompiledRendererTypeHandler
import org.jetbrains.kotlinx.jupyter.api.RendererFieldHandler
import org.jetbrains.kotlinx.jupyter.api.RenderersProcessor
import org.jetbrains.kotlinx.jupyter.api.libraries.ExecutionHost

interface ResultsRenderersProcessor : RenderersProcessor {
    /**
     * Renders cell result [field] represented as [FieldValue] in the [host] context
     */
    fun renderResult(
        host: ExecutionHost,
        field: FieldValue,
    ): Any?

    /**
     * Adds new [renderer] for this notebook.
     * Returns code to be executed on execution host
     * for [PrecompiledRendererTypeHandler]'s.
     */
    fun register(renderer: RendererFieldHandler): Code?

    fun register(
        renderer: RendererFieldHandler,
        priority: Int,
    ): Code?
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy