Struct cpython::PyNone [−][src]
pub struct PyNone;
Expand description
An empty struct that represents None
in Python.
This can be used as a function return type for functions that should return
None
in Python.
Example
use cpython::{Python, PyResult, PyNone};
fn example(py: Python) -> PyResult<PyNone> {
Ok(PyNone)
}
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
type ObjectType = PyObject
Converts self into a Python object.
Converts self into a Python object. Read more
Auto Trait Implementations
impl RefUnwindSafe for PyNone
impl UnwindSafe for PyNone
Blanket Implementations
Mutably borrows from an owned value. Read more