pub struct FieldSpec {
pub ty: TypeSpec,
pub required: bool,
pub default: Option<Value>,
pub min: Option<f64>,
pub max: Option<f64>,
}Expand description
契约中的字段规格
Fields§
§ty: TypeSpec§required: bool是否必填(默认 true)
default: Option<Value>缺失时填充的默认值
min: Option<f64>数值下界(含)
max: Option<f64>数值上界(含)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldSpec
impl RefUnwindSafe for FieldSpec
impl Send for FieldSpec
impl Sync for FieldSpec
impl Unpin for FieldSpec
impl UnsafeUnpin for FieldSpec
impl UnwindSafe for FieldSpec
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