pub struct SherpProperty {Show 14 fields
pub prop_type: SherpType,
pub description: Option<String>,
pub default: Option<Value>,
pub required: bool,
pub enum_values: Option<Vec<Value>>,
pub pattern: Option<String>,
pub min: Option<f64>,
pub max: Option<f64>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub properties: Option<HashMap<String, SherpProperty>>,
pub items: Option<Box<SherpProperty>>,
pub min_items: Option<usize>,
pub max_items: Option<usize>,
}Expand description
Simplified Sherpack schema definition for a single property
Fields§
§prop_type: SherpTypeType of the property
description: Option<String>Description for documentation
default: Option<Value>Default value
required: boolWhether this property is required
enum_values: Option<Vec<Value>>Allowed values (enum constraint)
pattern: Option<String>Pattern for string validation (regex)
min: Option<f64>Minimum value for numbers
max: Option<f64>Maximum value for numbers
min_length: Option<usize>Minimum length for strings
max_length: Option<usize>Maximum length for strings
properties: Option<HashMap<String, SherpProperty>>Nested properties for objects
items: Option<Box<SherpProperty>>Item schema for arrays
min_items: Option<usize>Minimum array items
max_items: Option<usize>Maximum array items
Trait Implementations§
Source§impl Clone for SherpProperty
impl Clone for SherpProperty
Source§fn clone(&self) -> SherpProperty
fn clone(&self) -> SherpProperty
Returns a duplicate of the value. Read more
1.0.0 · 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 SherpProperty
impl Debug for SherpProperty
Source§impl<'de> Deserialize<'de> for SherpProperty
impl<'de> Deserialize<'de> for SherpProperty
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 SherpProperty
impl RefUnwindSafe for SherpProperty
impl Send for SherpProperty
impl Sync for SherpProperty
impl Unpin for SherpProperty
impl UnwindSafe for SherpProperty
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