Struct cpython::PyNone[][src]

pub struct PyNone;

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

impl Clone for PyNone[src]

impl Copy for PyNone[src]

impl Debug for PyNone[src]

impl Default for PyNone[src]

impl Eq for PyNone[src]

impl FromPyObject<'_> for PyNone[src]

impl Hash for PyNone[src]

impl Ord for PyNone[src]

impl PartialEq<PyNone> for PyNone[src]

impl PartialOrd<PyNone> for PyNone[src]

impl StructuralEq for PyNone[src]

impl StructuralPartialEq for PyNone[src]

impl ToPyObject for PyNone[src]

type ObjectType = PyObject

Auto Trait Implementations

impl RefUnwindSafe for PyNone[src]

impl Send for PyNone[src]

impl Sync for PyNone[src]

impl Unpin for PyNone[src]

impl UnwindSafe for PyNone[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.