pub enum OutputFormat {
Exact(String),
Pattern(String),
Json,
JsonWithFields(Vec<String>),
Markers {
start: String,
end: String,
},
OneOf(Vec<String>),
Custom {
description: String,
validator_id: String,
},
}Expand description
Expected output format for validation
Variants§
Exact(String)
Must match exact string
Pattern(String)
Must match regex pattern
Json
Must parse as valid JSON
JsonWithFields(Vec<String>)
Must parse as valid JSON with specific structure
Markers
Must contain specific markers
OneOf(Vec<String>)
Must be one of specific values
Custom
Custom validator function (stored as description)
Implementations§
Source§impl OutputFormat
impl OutputFormat
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
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 OutputFormat
impl Debug for OutputFormat
Source§impl<'de> Deserialize<'de> for OutputFormat
impl<'de> Deserialize<'de> for OutputFormat
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
Auto Trait Implementations§
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