Skip to main content

PluginResults

Struct PluginResults 

Source
pub struct PluginResults { /* private fields */ }
Expand description

Result struct for each plugin Specifies the plugin name and a vector of the results

Implementations§

Source§

impl PluginResults

Source

pub fn new(plugin: &'static str) -> Self

Creates a new PluginResults object

Source

pub fn pass(&mut self, check: &str, msg: impl Into<String>)

Helper to create a passing result check

Source

pub fn warn(&mut self, check: &str, msg: impl Into<String>)

Helper to create a warning result check

Source

pub fn fail(&mut self, check: &str, msg: impl Into<String>)

Helper to create a failure result check

Source

pub fn info(&mut self, check: &str, msg: impl Into<String>)

Helper to create an information result check

Source

pub fn warn_with( &mut self, check: &str, msg: impl Into<String>, details: impl Into<String>, )

Helper to create a warning result check with details

Source

pub fn fail_with( &mut self, check: &str, msg: impl Into<String>, details: impl Into<String>, )

Helper to create a failure result check with details

Source

pub fn push(&mut self, result: CheckResult)

Pushes a result into the array

Source

pub fn take(&mut self) -> Vec<CheckResult>

Takes ownership of the stored results and returns them

Source

pub fn len(&self) -> usize

Returns the length of the inner result array

Source

pub fn is_empty(&self) -> bool

Returns true if the inner results array is empty

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>,

Source§

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>,

Source§

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.