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 Copy for NoArgs
[src]
impl Copy for NoArgs
impl Clone for NoArgs
[src]
impl Clone for NoArgs
fn clone(&self) -> NoArgs
[src]
fn clone(&self) -> NoArgs
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for NoArgs
[src]
impl Debug for NoArgs
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl ToPyObject for NoArgs
[src]
impl ToPyObject for NoArgs
Converts NoArgs
to an empty Python tuple.
type ObjectType = PyTuple
fn to_py_object(&self, py: Python) -> PyTuple
[src]
fn to_py_object(&self, py: Python) -> PyTuple
Converts self into a Python object.
fn into_py_object(self, py: Python) -> Self::ObjectType where
Self: Sized,
[src]
fn into_py_object(self, py: Python) -> Self::ObjectType where
Self: Sized,
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]
fn with_borrowed_ptr<F, R>(&self, py: Python, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,
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]
impl<'source> FromPyObject<'source> for NoArgs