pub enum FormatVersion {
String(String),
Integer(u32),
}Expand description
Format version - accepts both string “4.0.0” and integer 4 using the shared contract.
Variants§
Implementations§
Source§impl FormatVersion
impl FormatVersion
Sourcepub fn normalize(
&self,
) -> Result<NormalizedFormatVersion, FormatVersionDiagnostic>
pub fn normalize( &self, ) -> Result<NormalizedFormatVersion, FormatVersionDiagnostic>
Normalize this wire spelling against the reference support table.
Trait Implementations§
Source§impl Clone for FormatVersion
impl Clone for FormatVersion
Source§impl Debug for FormatVersion
impl Debug for FormatVersion
Source§impl Default for FormatVersion
impl Default for FormatVersion
Source§impl<'de> Deserialize<'de> for FormatVersion
impl<'de> Deserialize<'de> for FormatVersion
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 From<CanonicalSpelling> for FormatVersion
impl From<CanonicalSpelling> for FormatVersion
Source§fn from(value: CanonicalSpelling) -> Self
fn from(value: CanonicalSpelling) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for FormatVersion
impl JsonSchema for FormatVersion
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for FormatVersion
impl PartialEq for FormatVersion
Source§impl Serialize for FormatVersion
impl Serialize for FormatVersion
impl StructuralPartialEq for FormatVersion
Auto Trait Implementations§
impl Freeze for FormatVersion
impl RefUnwindSafe for FormatVersion
impl Send for FormatVersion
impl Sync for FormatVersion
impl Unpin for FormatVersion
impl UnsafeUnpin for FormatVersion
impl UnwindSafe for FormatVersion
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