[][src]Trait exonum::helpers::ValidateInput

pub trait ValidateInput: Sized {
    type Error;
    fn validate(&self) -> Result<(), Self::Error>;

    fn into_validated(self) -> Result<Self, Self::Error> { ... }
}

Basic trait to validate user defined input.

Associated Types

type Error

The type returned in the event of a validate error.

Loading content...

Required methods

fn validate(&self) -> Result<(), Self::Error>

Perform parameters validation for this configuration and return error if value is inconsistent.

Loading content...

Provided methods

fn into_validated(self) -> Result<Self, Self::Error>

The same as validate method, but returns the value itself as a successful result.

Loading content...

Implementors

impl ValidateInput for ConsensusConfig[src]

type Error = Error

impl ValidateInput for ValidatorKeys[src]

type Error = Error

impl ValidateInput for ArtifactId[src]

type Error = Error

fn validate(&self) -> Result<(), Self::Error>[src]

Checks that the artifact name contains only allowed characters and is not empty.

impl ValidateInput for InstanceSpec[src]

type Error = Error

Loading content...