Trait check_mate::Check[][src]

pub trait Check {
    type Ok;
    type Err;
    fn check(self) -> Result<Self::Ok, Self::Err>;
}
Expand description

Checked values.

Associated Types

The value returned when the check passes.

This will often be Self, but it’s specified as an associated type to allow for information to be lost from the checked value.

The error returned when the check fails.

Required methods

Check self.

Errors

If self is valid this should return Ok(Self::Ok), and otherwise Err(Self::Err).

Implementors