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
sourceimpl<'s> FromPyObject<'s> for NoArgs
impl<'s> FromPyObject<'s> for NoArgs
sourceimpl ToPyObject for NoArgs
impl ToPyObject for NoArgs
Converts NoArgs
to an empty Python tuple.
type ObjectType = PyTuple
sourcefn to_py_object(&self, py: Python<'_>) -> PyTuple
fn to_py_object(&self, py: Python<'_>) -> PyTuple
Converts self into a Python object.
sourcefn 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 RefUnwindSafe for NoArgs
impl Send for NoArgs
impl Sync for NoArgs
impl Unpin for NoArgs
impl UnwindSafe for NoArgs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more