Struct cpython::PyNone [−][src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for PyNone
[src]
fn cmp(&self, other: &PyNone) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<PyNone> for PyNone
[src]
impl PartialOrd<PyNone> for PyNone
[src]
fn partial_cmp(&self, other: &PyNone) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for PyNone
[src]
impl StructuralPartialEq for PyNone
[src]
impl ToPyObject for PyNone
[src]
type ObjectType = PyObject
fn to_py_object(&self, py: Python<'_>) -> PyObject
[src]
fn into_py_object(self, py: Python<'_>) -> Self::ObjectType where
Self: Sized,
[src]
Self: Sized,
fn with_borrowed_ptr<F, R>(&self, py: Python<'_>, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,
[src]
F: FnOnce(*mut PyObject) -> R,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,