Type Alias PyResult

Source
pub type PyResult<T = PyObjectRef> = Result<T, PyBaseExceptionRef>;
Expand description

Use this type for functions which return a python object or an exception. Both the python object and the python exception are PyObjectRef types since exceptions are also python objects.

Aliased Type§

enum PyResult<T = PyObjectRef> {
    Ok(T),
    Err(PyRef<PyBaseException>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(PyRef<PyBaseException>)

Contains the error value

Trait Implementations§

Morty Proxy This is a proxified and sanitized view of the page, visit original site.