pub struct NoArgs;
Expand description
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§
source§impl<'s> FromPyObject<'s> for NoArgs
impl<'s> FromPyObject<'s> for NoArgs
source§impl ToPyObject for NoArgs
impl ToPyObject for NoArgs
Converts NoArgs
to an empty Python tuple.
type ObjectType = PyTuple
source§fn to_py_object(&self, py: Python<'_>) -> PyTuple
fn to_py_object(&self, py: Python<'_>) -> PyTuple
Converts self into a Python object.
source§fn into_py_object(self, py: Python<'_>) -> Self::ObjectTypewhere
Self: Sized,
fn into_py_object(self, py: Python<'_>) -> Self::ObjectTypewhere
Self: Sized,
Converts self into a Python object. Read more
impl Copy for NoArgs
Auto Trait Implementations§
impl Freeze for NoArgs
impl RefUnwindSafe for NoArgs
impl Send for NoArgs
impl Sync for NoArgs
impl Unpin for NoArgs
impl UnwindSafe for NoArgs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more