[][src]Trait ieql::common::validation::Validatable

pub trait Validatable {
    fn validate(&self) -> Option<Vec<Issue>>;
}

This trait provides types with the validate function. It is useful for types whose data structures can have many different states, only some of which are valid.

Required methods

fn validate(&self) -> Option<Vec<Issue>>

This function determines whether self is valid. When it is valid, this function will return None. Otherwise, if there are issues, it will return Some(Vec<Issue>).

Loading content...

Implementors

impl Validatable for Pattern
[src]

fn validate(&self) -> Option<Vec<Issue>>
[src]

This function determines whether the Pattern is valid. It performs a compilation check for itself and for its RegEx.

Returns None if there is no issue; otherwise, Some(Vec<Issue>).

impl Validatable for Query
[src]

fn validate(&self) -> Option<Vec<Issue>>
[src]

Validates the query, as well as all of its sub-components.

While this is an important mechanism for proper validation (note that some invalid queries will still compile), one should always double-check the results by actually compiling the query and performing a test scan.

impl Validatable for Response
[src]

fn validate(&self) -> Option<Vec<Issue>>
[src]

Validates the Response and ensures that no invalid parameters are present.

More specifically, this function ensures that Excerpt and Url, which are not reducable, are not present in include.

Loading content...