pub struct ContentVocabulary {
pub content_media_type: Option<String>,
pub content_encoding: Option<String>,
pub content_schema: Option<Box<SchemaValue>>,
}Expand description
Content vocabulary — contentMediaType, contentEncoding,
contentSchema.
Fields§
§content_media_type: Option<String>The contentMediaType keyword — media type of string content.
If the instance is a string, this property indicates the media
type of the contents of the string. If "contentEncoding" is
present, this property describes the decoded string.
The value of this property MUST be a string, which MUST be a media type, as defined by RFC 2046.
content_encoding: Option<String>The contentEncoding keyword — encoding of string content.
If the instance value is a string, this property defines that the string SHOULD be interpreted as encoded binary data and decoded using the encoding named by this property.
Possible values indicating base 16, 32, and 64 encodings with several variations are listed in RFC 4648. Additionally, sections 6.7 and 6.8 of RFC 2045 provide encodings used in MIME.
If this keyword is absent, but "contentMediaType" is present,
this indicates that the encoding is the identity encoding,
meaning that no transformation was needed in order to represent
the content in a UTF-8 string.
The value of this property MUST be a string.
content_schema: Option<Box<SchemaValue>>The contentSchema keyword — schema for decoded string content.
If the instance is a string, and if "contentMediaType" is
present, this property contains a schema which describes the
structure of the string.
This keyword MAY be used with any media type that can be mapped into JSON Schema’s data model.
The value of this property MUST be a valid JSON schema. It
SHOULD be ignored if "contentMediaType" is not present.
Trait Implementations§
Source§impl Clone for ContentVocabulary
impl Clone for ContentVocabulary
Source§fn clone(&self) -> ContentVocabulary
fn clone(&self) -> ContentVocabulary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContentVocabulary
impl Debug for ContentVocabulary
Source§impl Default for ContentVocabulary
impl Default for ContentVocabulary
Source§fn default() -> ContentVocabulary
fn default() -> ContentVocabulary
Source§impl<'de> Deserialize<'de> for ContentVocabulary
impl<'de> Deserialize<'de> for ContentVocabulary
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>,
Source§impl JsonSchema for ContentVocabulary
impl JsonSchema for ContentVocabulary
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ContentVocabulary
impl PartialEq for ContentVocabulary
Source§impl Serialize for ContentVocabulary
impl Serialize for ContentVocabulary
impl Eq for ContentVocabulary
impl StructuralPartialEq for ContentVocabulary
Auto Trait Implementations§
impl Freeze for ContentVocabulary
impl RefUnwindSafe for ContentVocabulary
impl Send for ContentVocabulary
impl Sync for ContentVocabulary
impl Unpin for ContentVocabulary
impl UnsafeUnpin for ContentVocabulary
impl UnwindSafe for ContentVocabulary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.