Struct cfn_guard::TestBuilder

source ·
pub struct TestBuilder { /* private fields */ }
Expand description

. A builder to help construct the Test command

Implementations§

source§

impl TestBuilder

source

pub fn rules(self, rules: Option<String>) -> Self

source

pub fn test_data(self, test_data: Option<String>) -> Self

source

pub fn directory(self, directory: Option<String>) -> Self

source

pub fn alphabetical(self, arg: bool) -> Self

Test files in a directory ordered alphabetically, conflicts with last_modified field default is false

source

pub fn last_modified(self, arg: bool) -> Self

Test files in a directory ordered by last modified times, conflicts with alphabetical field default is false

source

pub fn verbose(self, arg: bool) -> Self

Output verbose logging, conflicts with output_format if not single-line-summary default is false

source

pub fn output_format(self, output: OutputFormatType) -> Self

Specify the format in which the output should be displayed default is single-line-summary will conflict with verbose if set to something other than single-line-summary and verbose is set to true

Trait Implementations§

source§

impl CommandBuilder<Test> for TestBuilder

source§

fn try_build(self) -> Result<Test, Error>

. attempts to construct a Test command

This function will return an error if

  • conflicting attributes have been set
  • rules, test-data, and directory is set to None
source§

impl Debug for TestBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TestBuilder

source§

fn default() -> TestBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.