Trait PROSResult

Source
pub trait PROSResult: Sized {
    // Required method
    fn check(self) -> Result<Self, PROSErr>;
}
Expand description

A type which may contain a PROSErr depending upon a sentinel value that represents errors

Implementations are provided for i32, f64 and *mut T values based on either PRO’s sentinel error values (PROS_ERR or PROS_ERR_F in C/C++) or a NULL pointer

Required Methods§

Source

fn check(self) -> Result<Self, PROSErr>

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PROSResult for f64

Source§

fn check(self) -> Result<Self, PROSErr>

Source§

impl PROSResult for i32

Source§

fn check(self) -> Result<Self, PROSErr>

Source§

impl<T> PROSResult for *mut T

Source§

fn check(self) -> Result<Self, PROSErr>

Implementors§