Skip to main content

ViewData

Trait ViewData 

Source
pub trait ViewData: Serialize + DeserializeOwned {
    const KIND: &'static str;
    const V: u32;

    // Required method
    fn fallback(&self) -> String;
}
Expand description

A typed view: the struct is the data schema of kind ViewData::KIND.

Required Associated Constants§

Source

const KIND: &'static str

Source

const V: u32

Current schema version.

Required Methods§

Source

fn fallback(&self) -> String

What a client without a renderer shows.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl ViewData for McpApp

Source§

const KIND: &'static str = "byob.mcp_app"

Source§

const V: u32 = 1

Source§

impl ViewData for Node

Source§

const KIND: &'static str = KIND

Source§

const V: u32 = VERSION

Source§

impl ViewData for PluginCard

Source§

const KIND: &'static str = "byob.plugin_card"

Source§

const V: u32 = 1

Source§

impl ViewData for WebCard

Source§

const KIND: &'static str = "byob.web"

Source§

const V: u32 = 1