Trait leetcode_api::render::Render

source ·
pub trait Render {
    // Required method
    fn to_para_vec(&self) -> Vec<Line<'_>>;

    // Provided methods
    fn to_md_str(&self, _with_env: bool) -> String { ... }
    fn render_with_mdcat(&self) { ... }
}

Required Methods§

source

fn to_para_vec(&self) -> Vec<Line<'_>>

for ratatui’s paragraph widget

Provided Methods§

source

fn to_md_str(&self, _with_env: bool) -> String

uniform treatment Question detail to markdown String

  • _with_env: for Question whether display Question Compile Environment
source

fn render_with_mdcat(&self)

use mdcat render question content

Implementors§