pub struct FieldMeta {
pub rust: &'static str,
pub orig: &'static str,
pub db: &'static str,
pub as_: Option<&'static str>,
pub tags: &'static [&'static str],
pub omitempty_tags: &'static [&'static str],
pub with_quote: bool,
}Fields§
§rust: &'static strRust 字段名(用于生成取值代码)
orig: &'static str用于 FieldMapper 的“原始字段名”(对齐 go 的 reflect.StructField.Name)。
Rust 无法获得运行时字段名;这里由宏生成,默认等于 rust,
但测试/用户可以显式指定以对齐 go 的 CamelCase 命名。
db: &'static strSQL 列名(db tag / mapper 之后)
as_: Option<&'static str>可选别名(AS)
tags
omitempty tags(包含 “” 表示默认)
with_quote: boolImplementations§
Trait Implementations§
impl Eq for FieldMeta
impl StructuralPartialEq for FieldMeta
Auto Trait Implementations§
impl Freeze for FieldMeta
impl RefUnwindSafe for FieldMeta
impl Send for FieldMeta
impl Sync for FieldMeta
impl Unpin for FieldMeta
impl UnwindSafe for FieldMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more