[−][src]Struct cpython::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
fn to_py_object(&self, py: Python) -> PyTuple
[src]
fn into_py_object(self, py: Python) -> Self::ObjectType where
Self: Sized,
[src]
Self: Sized,
fn with_borrowed_ptr<F, R>(&self, py: Python, f: F) -> R where
F: FnOnce(*mut PyObject) -> R,
[src]
F: FnOnce(*mut PyObject) -> R,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,