pub struct ValidateBuilder { /* private fields */ }Expand description
.
A builder to help construct the Validate command
Implementations§
Source§impl ValidateBuilder
impl ValidateBuilder
Sourcepub fn rules(self, rules: Vec<String>) -> Self
pub fn rules(self, rules: Vec<String>) -> Self
a list of paths that point to rule files, or a directory containing rule files on a local machine. Only files that end with .guard or .ruleset will be evaluated conflicts with payload
Sourcepub fn data(self, data: Vec<String>) -> Self
pub fn data(self, data: Vec<String>) -> Self
a list of paths that point to data files, or a directory containing data files for the rules to be evaluated against. Only JSON, or YAML files will be used conflicts with payload
Sourcepub fn show_summary(self, args: Vec<ShowSummaryType>) -> Self
pub fn show_summary(self, args: Vec<ShowSummaryType>) -> Self
Controls if the summary table needs to be displayed. –show-summary fail (default) or –show-summary pass,fail (only show rules that did pass/fail) or –show-summary none (to turn it off) or –show-summary all (to show all the rules that pass, fail or skip) default is failed must be set to none if used together with the structured flag
Sourcepub fn input_params(self, input_params: Vec<String>) -> Self
pub fn input_params(self, input_params: Vec<String>) -> Self
a list of paths that point to data files, or a directory containing data files to be merged with the data argument and then the rules will be evaluated against them. Only JSON, or YAML files will be used
Sourcepub fn output_format(self, output: OutputFormatType) -> Self
pub fn output_format(self, output: OutputFormatType) -> Self
Specify the format in which the output should be displayed
default is single-line-summary
if junit is used, structured attributed must be set to true
Sourcepub fn payload(self, arg: bool) -> Self
pub fn payload(self, arg: bool) -> Self
Tells the command that rules, and data will be passed via a reader, as a json payload. Conflicts with both rules, and data default is false
Sourcepub fn alphabetical(self, arg: bool) -> Self
pub fn alphabetical(self, arg: bool) -> Self
Validate files in a directory ordered alphabetically, conflicts with last_modified field
Sourcepub fn last_modified(self, arg: bool) -> Self
pub fn last_modified(self, arg: bool) -> Self
Validate files in a directory ordered by last modified times, conflicts with alphabetical field
Sourcepub fn verbose(self, arg: bool) -> Self
pub fn verbose(self, arg: bool) -> Self
Output verbose logging, conflicts with structured field
default is false
Sourcepub fn print_json(self, arg: bool) -> Self
pub fn print_json(self, arg: bool) -> Self
Print the parse tree in a json format. This can be used to get more details on how the clauses were evaluated
conflicts with the structured attribute
default is false
Sourcepub fn structured(self, arg: bool) -> Self
pub fn structured(self, arg: bool) -> Self
Prints the output which must be specified to JSON/YAML/JUnit in a structured format
Conflicts with the following attributes verbose, print-json, output-format when set
to “single-line-summary”, show-summary when set to anything other than “none”
default is false
Trait Implementations§
Source§impl CommandBuilder<Validate> for ValidateBuilder
impl CommandBuilder<Validate> for ValidateBuilder
Source§impl Debug for ValidateBuilder
impl Debug for ValidateBuilder
Source§impl Default for ValidateBuilder
impl Default for ValidateBuilder
Source§impl From<ValidateBuilder> for JsValue
impl From<ValidateBuilder> for JsValue
Source§fn from(value: ValidateBuilder) -> Self
fn from(value: ValidateBuilder) -> Self
Source§impl FromWasmAbi for ValidateBuilder
impl FromWasmAbi for ValidateBuilder
Source§impl IntoWasmAbi for ValidateBuilder
impl IntoWasmAbi for ValidateBuilder
Source§impl LongRefFromWasmAbi for ValidateBuilder
impl LongRefFromWasmAbi for ValidateBuilder
Source§impl OptionFromWasmAbi for ValidateBuilder
impl OptionFromWasmAbi for ValidateBuilder
Source§impl OptionIntoWasmAbi for ValidateBuilder
impl OptionIntoWasmAbi for ValidateBuilder
Source§impl RefFromWasmAbi for ValidateBuilder
impl RefFromWasmAbi for ValidateBuilder
Source§type Anchor = RcRef<ValidateBuilder>
type Anchor = RcRef<ValidateBuilder>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for ValidateBuilder
impl RefMutFromWasmAbi for ValidateBuilder
Source§impl TryFromJsValue for ValidateBuilder
impl TryFromJsValue for ValidateBuilder
Source§impl VectorFromWasmAbi for ValidateBuilder
impl VectorFromWasmAbi for ValidateBuilder
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ValidateBuilder]>
Source§impl VectorIntoWasmAbi for ValidateBuilder
impl VectorIntoWasmAbi for ValidateBuilder
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ValidateBuilder]>) -> Self::Abi
Source§impl WasmDescribeVector for ValidateBuilder
impl WasmDescribeVector for ValidateBuilder
impl SupportsConstructor for ValidateBuilder
impl SupportsInstanceProperty for ValidateBuilder
impl SupportsStaticProperty for ValidateBuilder
Auto Trait Implementations§
impl Freeze for ValidateBuilder
impl RefUnwindSafe for ValidateBuilder
impl Send for ValidateBuilder
impl Sync for ValidateBuilder
impl Unpin for ValidateBuilder
impl UnsafeUnpin for ValidateBuilder
impl UnwindSafe for ValidateBuilder
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.