[][src]Struct cpython::NoArgs

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 ToPyObject for NoArgs[src]

Converts NoArgs to an empty Python tuple.

type ObjectType = PyTuple

fn into_py_object(self, py: Python) -> Self::ObjectType where
    Self: Sized
[src]

Converts self into a Python object. Read more

fn with_borrowed_ptr<F, R>(&self, py: Python, f: F) -> R where
    F: FnOnce(*mut PyObject) -> R, 
[src]

Converts self into a Python object and calls the specified closure on the native FFI pointer underlying the Python object. Read more

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

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

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

impl Copy for NoArgs[src]

impl Clone for NoArgs[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for NoArgs[src]

Auto Trait Implementations

impl Sync for NoArgs

impl Unpin for NoArgs

impl Send for NoArgs

impl UnwindSafe for NoArgs

impl RefUnwindSafe for NoArgs

Blanket Implementations

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> From<T> for T[src]

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.

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

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

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