Skip to main content

ReplyData

Trait ReplyData 

Source
pub trait ReplyData: Send + Sync {
    // Required methods
    fn write_json(&self, out: &mut Vec<u8>) -> Result<()>;
    fn to_json(&self) -> Result<Value>;

    // Provided methods
    fn type_name(&self) -> &'static str { ... }
    fn shown(&self) -> Option<Shown<'_>> { ... }
}

Required Methods§

Source

fn write_json(&self, out: &mut Vec<u8>) -> Result<()>

Source

fn to_json(&self) -> Result<Value>

Provided Methods§

Source

fn type_name(&self) -> &'static str

Source

fn shown(&self) -> Option<Shown<'_>>

None renders a screen from the JSON it converts to.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§