#[non_exhaustive]pub enum OutputFormat {
Pretty,
Json,
}Expand description
The output representation a view writes a result in.
A format, such as YAML, can join the set in a minor release. So a match on it outside ctl-core ends with a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl OutputFormat
impl OutputFormat
Sourcepub fn is_json(self) -> bool
pub fn is_json(self) -> bool
Whether this is Self::Json, so the output is for machines.
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
impl Copy for OutputFormat
Source§impl Debug for OutputFormat
impl Debug for OutputFormat
Source§impl Default for OutputFormat
impl Default for OutputFormat
Source§impl<'de> Deserialize<'de> for OutputFormat
Available on crate feature json only.
impl<'de> Deserialize<'de> for OutputFormat
Available on crate feature
json only.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 Display for OutputFormat
impl Display for OutputFormat
impl Eq for OutputFormat
Source§impl FromStr for OutputFormat
impl FromStr for OutputFormat
Source§impl JsonSchema for OutputFormat
Available on crate feature schema only.
impl JsonSchema for OutputFormat
Available on crate feature
schema only.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 OutputFormat
impl PartialEq for OutputFormat
Source§impl Serialize for OutputFormat
Available on crate feature json only.
impl Serialize for OutputFormat
Available on crate feature
json only.impl StructuralPartialEq for OutputFormat
Source§impl ValueEnum for OutputFormat
Available on crate feature cli only.
impl ValueEnum for OutputFormat
Available on crate feature
cli only.Auto Trait Implementations§
impl Forget for OutputFormat
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnsafeUnpin for OutputFormat
impl UnwindSafe for OutputFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
impl<T, O> Matches<O> for Twhere
T: PartialEq<O>,
fn validate_matches(&self, other: &O) -> bool
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more