Skip to main content

SelectRow

Trait SelectRow 

Source
pub trait SelectRow: Sized {
    const HEADERS: &'static [&'static str];
    const WIDTHS: &'static [Constraint];

    // Required methods
    fn parse(plist: &Value) -> Result<Self, String>;
    fn key(&self) -> &str;
    fn cells(&self) -> Vec<String>;

    // Provided method
    fn has_key(&self, key: &str) -> bool { ... }
}
Expand description

A row type a SelectList can fetch, select by key and draw.

Required Associated Constants§

Source

const HEADERS: &'static [&'static str]

Source

const WIDTHS: &'static [Constraint]

Required Methods§

Source

fn parse(plist: &Value) -> Result<Self, String>

Source

fn key(&self) -> &str

Identity of the row, kept selected across reloads.

Source

fn cells(&self) -> Vec<String>

Provided Methods§

Source

fn has_key(&self, key: &str) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SelectRow for ConfigEntry

Source§

const HEADERS: &'static [&'static str]

Source§

const WIDTHS: &'static [Constraint]

Source§

impl SelectRow for ScriptRow

Source§

const HEADERS: &'static [&'static str]

Source§

const WIDTHS: &'static [Constraint]

Source§

impl SelectRow for SshKeyRow

Source§

const HEADERS: &'static [&'static str]

Source§

const WIDTHS: &'static [Constraint]

Source§

impl SelectRow for TagRow

Source§

const HEADERS: &'static [&'static str]

Source§

const WIDTHS: &'static [Constraint]

Source§

impl SelectRow for TemplateRow

Source§

const HEADERS: &'static [&'static str]

Source§

const WIDTHS: &'static [Constraint]