pub struct Param {
pub name: String,
pub coercer: Option<Box<dyn Coercer + Send + Sync>>,
pub nest: Option<Builder>,
pub description: Option<String>,
pub allow_null: bool,
pub validators: Validators,
pub default: Option<Value>,
pub schema_builder: Option<Box<dyn Fn(&mut Builder) + Send + Sync>>,
pub schema_id: Option<Url>,
}
Fields§
§name: String
§coercer: Option<Box<dyn Coercer + Send + Sync>>
§nest: Option<Builder>
§description: Option<String>
§allow_null: bool
§validators: Validators
§default: Option<Value>
§schema_builder: Option<Box<dyn Fn(&mut Builder) + Send + Sync>>
§schema_id: Option<Url>
Implementations§
Source§impl Param
impl Param
pub fn new(name: &str) -> Param
pub fn new_with_coercer( name: &str, coercer: Box<dyn Coercer + Send + Sync>, ) -> Param
pub fn new_with_nest( name: &str, coercer: Box<dyn Coercer + Send + Sync>, nest: Builder, ) -> Param
pub fn build<F>(name: &str, build_def: F) -> Param
pub fn desc(&mut self, description: &str)
pub fn schema_id(&mut self, id: Url)
pub fn schema<F>(&mut self, build: F)
pub fn coerce(&mut self, coercer: Box<dyn Coercer + Send + Sync>)
pub fn nest<F>(&mut self, nest_def: F)
pub fn allow_null(&mut self)
pub fn regex(&mut self, regex: Regex)
pub fn validate( &mut self, validator: Box<dyn Validator + Send + Sync + 'static>, )
pub fn validate_with<F>(&mut self, validator: F)
pub fn process( &self, val: &mut Value, path: &str, scope: &Option<&Scope>, ) -> ExtendedResult<Option<Value>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Param
impl !RefUnwindSafe for Param
impl Sync for Param
impl Unpin for Param
impl !UnwindSafe for Param
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