Struct cpython::NoArgs[][src]

pub struct NoArgs;

An empty struct that represents the empty argument list. Corresponds to the empty tuple () in Python.

Example

let gil_guard = cpython::Python::acquire_gil();
let py = gil_guard.python();
let os = py.import("os").unwrap();
let pid = os.call(py, "getpid", cpython::NoArgs, None).unwrap();

Trait Implementations

impl Clone for NoArgs[src]

impl Copy for NoArgs[src]

impl Debug for NoArgs[src]

impl<'s> FromPyObject<'s> for NoArgs[src]

fn extract(py: Python<'_>, obj: &'s PyObject) -> PyResult<Self>[src]

Returns Ok(NoArgs) if the input is an empty Python tuple. Otherwise, returns an error.

impl ToPyObject for NoArgs[src]

Converts NoArgs to an empty Python tuple.

type ObjectType = PyTuple

Auto Trait Implementations

impl RefUnwindSafe for NoArgs[src]

impl Send for NoArgs[src]

impl Sync for NoArgs[src]

impl Unpin for NoArgs[src]

impl UnwindSafe for NoArgs[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.