pub struct PrimitiveConstraints {
pub minimum: Option<ValueRef>,
pub maximum: Option<ValueRef>,
pub exclusive_minimum: Option<ValueRef>,
pub exclusive_maximum: Option<ValueRef>,
pub multiple_of: Option<ValueRef>,
pub min_length: Option<u64>,
pub max_length: Option<u64>,
pub pattern: Option<String>,
pub format_extension: Option<String>,
pub content_encoding: Option<String>,
pub content_media_type: Option<String>,
pub content_schema: Option<TypeRef>,
}Fields§
§minimum: Option<ValueRef>§maximum: Option<ValueRef>§exclusive_minimum: Option<ValueRef>§exclusive_maximum: Option<ValueRef>§multiple_of: Option<ValueRef>§min_length: Option<u64>§max_length: Option<u64>§pattern: Option<String>§format_extension: Option<String>§content_encoding: Option<String>JSON Schema 2020-12 contentEncoding (e.g. base64,
base32). Describes how the string value is encoded; the
decoded payload may have its own media type and schema.
String-only — populated for PrimitiveKind::String schemas.
content_media_type: Option<String>JSON Schema 2020-12 contentMediaType (e.g. image/png,
application/json). The media type of the decoded payload.
content_schema: Option<TypeRef>OAS 3.2 / JSON Schema 2020-12 contentSchema — schema for the
decoded payload (after applying contentEncoding). Carries a
TypeRef into crate::Ir::types so generators that decode
contentEncoding content can validate / shape it.
Trait Implementations§
Source§impl Clone for PrimitiveConstraints
impl Clone for PrimitiveConstraints
Source§fn clone(&self) -> PrimitiveConstraints
fn clone(&self) -> PrimitiveConstraints
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 PrimitiveConstraints
impl Debug for PrimitiveConstraints
Source§impl Default for PrimitiveConstraints
impl Default for PrimitiveConstraints
Source§fn default() -> PrimitiveConstraints
fn default() -> PrimitiveConstraints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PrimitiveConstraints
impl<'de> Deserialize<'de> for PrimitiveConstraints
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
Source§impl PartialEq for PrimitiveConstraints
impl PartialEq for PrimitiveConstraints
Source§fn eq(&self, other: &PrimitiveConstraints) -> bool
fn eq(&self, other: &PrimitiveConstraints) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PrimitiveConstraints
impl Serialize for PrimitiveConstraints
impl StructuralPartialEq for PrimitiveConstraints
Auto Trait Implementations§
impl Freeze for PrimitiveConstraints
impl RefUnwindSafe for PrimitiveConstraints
impl Send for PrimitiveConstraints
impl Sync for PrimitiveConstraints
impl Unpin for PrimitiveConstraints
impl UnsafeUnpin for PrimitiveConstraints
impl UnwindSafe for PrimitiveConstraints
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