Trait crs_bind::error::SentinelError[][src]

pub trait SentinelError: Sized {
    fn check(self) -> Result<Self, Error>;
}

Represents a type which has some sentinel values which represent errors.

Implementations are provided for i32 and f64 based on PROS’s sentinel error values, represented by PROS_ERR and PROS_ERR_F in C/C++.

Required methods

fn check(self) -> Result<Self, Error>[src]

Checks if the type is a valid (success value), giving an appropriate error otherwise.

Loading content...

Implementors

impl SentinelError for f64[src]

impl SentinelError for i32[src]

impl<T> SentinelError for *mut T[src]

Loading content...