pub enum TrailingCommas {
Always,
Jsonc,
Maintain,
Never,
}Expand description
Variants§
Always
Always format with trailing commas. Beware: trailing commas can cause many JSON parsers to fail.
Jsonc
Use trailing commas in JSONC files and do not use trailing commas in JSON files.
Maintain
Keep the trailing comma if it exists.
Never
Never format with trailing commas.
Trait Implementations§
Source§impl Clone for TrailingCommas
impl Clone for TrailingCommas
Source§fn clone(&self) -> TrailingCommas
fn clone(&self) -> TrailingCommas
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 TrailingCommas
impl Debug for TrailingCommas
Source§impl<'de> Deserialize<'de> for TrailingCommas
impl<'de> Deserialize<'de> for TrailingCommas
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 JsonSchema for TrailingCommas
impl JsonSchema for TrailingCommas
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 TrailingCommas
impl PartialEq for TrailingCommas
Source§impl Serialize for TrailingCommas
impl Serialize for TrailingCommas
impl Copy for TrailingCommas
impl Eq for TrailingCommas
impl StructuralPartialEq for TrailingCommas
Auto Trait Implementations§
impl Freeze for TrailingCommas
impl RefUnwindSafe for TrailingCommas
impl Send for TrailingCommas
impl Sync for TrailingCommas
impl Unpin for TrailingCommas
impl UnsafeUnpin for TrailingCommas
impl UnwindSafe for TrailingCommas
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