pub struct AttributeConstraint {
pub description: Option<String>,
pub attr_type: Option<String>,
pub format: Option<String>,
pub pattern: Option<String>,
pub enum_values: Vec<String>,
pub recommended: Vec<String>,
pub unique: bool,
pub min: Option<i32>,
pub max: Option<i32>,
pub default: Option<Value>,
}Expand description
Attribute constraint
Fields§
§description: Option<String>Description
attr_type: Option<String>Type (string, integer, boolean, etc.)
format: Option<String>Format (iso8601, uri, etc.)
pattern: Option<String>Regex pattern
enum_values: Vec<String>Enum values
recommended: Vec<String>Recommended values
unique: boolMust be unique across document
min: Option<i32>Minimum value
max: Option<i32>Maximum value
default: Option<Value>Default value
Trait Implementations§
Source§impl Clone for AttributeConstraint
impl Clone for AttributeConstraint
Source§fn clone(&self) -> AttributeConstraint
fn clone(&self) -> AttributeConstraint
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 AttributeConstraint
impl Debug for AttributeConstraint
Source§impl Default for AttributeConstraint
impl Default for AttributeConstraint
Source§fn default() -> AttributeConstraint
fn default() -> AttributeConstraint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AttributeConstraint
impl<'de> Deserialize<'de> for AttributeConstraint
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 AttributeConstraint
impl RefUnwindSafe for AttributeConstraint
impl Send for AttributeConstraint
impl Sync for AttributeConstraint
impl Unpin for AttributeConstraint
impl UnwindSafe for AttributeConstraint
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