Trait Field

Source
pub trait Field {
    // Required methods
    fn sql(&mut self, model: &str) -> String;
    fn hide(&mut self) -> &mut Self;
    fn describe(&mut self, text: &str) -> &mut Self;
    fn field(&mut self) -> JsonValue;
    fn swagger(&mut self) -> JsonValue;
    fn example(&mut self, data: JsonValue) -> &mut Self;

    // Provided method
    fn verify(&mut self, data: JsonValue) -> JsonValue { ... }
}

Required Methods§

Source

fn sql(&mut self, model: &str) -> String

Source

fn hide(&mut self) -> &mut Self

隐藏字段

Source

fn describe(&mut self, text: &str) -> &mut Self

字段描述

Source

fn field(&mut self) -> JsonValue

Source

fn swagger(&mut self) -> JsonValue

api格式

Source

fn example(&mut self, data: JsonValue) -> &mut Self

示例

Provided Methods§

Source

fn verify(&mut self, data: JsonValue) -> JsonValue

验证方法

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§