pub struct PropertySchema {
pub prop_type: PropertyType,
pub description: Option<String>,
pub title: Option<String>,
pub default: Option<Value>,
pub allowed: Vec<Value>,
pub min_length: Option<i64>,
pub max_length: Option<i64>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub multiple_of: Option<f64>,
pub pattern: Option<String>,
pub extra: BTreeMap<String, Value>,
}Fields§
§prop_type: PropertyType§description: Option<String>§title: Option<String>§default: Option<Value>§allowed: Vec<Value>§min_length: Option<i64>§max_length: Option<i64>§minimum: Option<f64>§maximum: Option<f64>§multiple_of: Option<f64>§pattern: Option<String>§extra: BTreeMap<String, Value>Implementations§
Source§impl PropertySchema
impl PropertySchema
Sourcepub fn validate_value(&self, value: &Value) -> Vec<String>
pub fn validate_value(&self, value: &Value) -> Vec<String>
Validate one config value against this property; returns violation details (empty when valid).
Trait Implementations§
Source§impl Clone for PropertySchema
impl Clone for PropertySchema
Source§fn clone(&self) -> PropertySchema
fn clone(&self) -> PropertySchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PropertySchema
impl Debug for PropertySchema
Source§impl<'de> Deserialize<'de> for PropertySchema
impl<'de> Deserialize<'de> for PropertySchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PropertySchema
impl RefUnwindSafe for PropertySchema
impl Send for PropertySchema
impl Sync for PropertySchema
impl Unpin for PropertySchema
impl UnsafeUnpin for PropertySchema
impl UnwindSafe for PropertySchema
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