Enum rustypy::pytypes::PyArg
[−]
[src]
pub enum PyArg { I64(i64), I32(i32), I16(i16), I8(i8), U64(u64), U32(u32), U16(u16), U8(u8), F32(f32), F64(f64), PyBool(PyBool), PyString(PyString), PyTuple(Box<PyTuple>), PyList(Box<PyList>), PyDict(*mut size_t), None, }
Enum type used to construct PyTuple and PyList types. All the kinds supported in Python are included here.
In Python, conversion of floats default to double precision unless explicitly stated adding the Float custom rustypy type to the return type signature.
from rustypy.rswrapper import Double, Float
bindings.my_binded_func.restype = Float
bindings.my_binded_func.restype = Double
Likewise, all 'int' types are converted to signed 64-bit integers by default.
Variants
I64(i64)
I32(i32)
I16(i16)
I8(i8)
U64(u64)
U32(u32)
U16(u16)
U8(u8)
F32(f32)
F64(f64)
PyBool(PyBool)
PyString(PyString)
PyTuple(Box<PyTuple>)
PyList(Box<PyList>)
PyDict(*mut size_t)
None
Methods
impl PyArg
[src]
Trait Implementations
impl Clone for PyArg
[src]
fn clone(&self) -> PyArg
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for PyArg
[src]
impl PartialEq for PyArg
[src]
fn eq(&self, __arg_0: &PyArg) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PyArg) -> bool
This method tests for !=
.
impl<'a> From<&'a str> for PyArg
[src]
impl From<String> for PyArg
[src]
impl From<PyString> for PyArg
[src]
impl From<bool> for PyArg
[src]
impl<'a> From<&'a bool> for PyArg
[src]
impl From<PyBool> for PyArg
[src]
impl From<i8> for PyArg
[src]
impl From<u8> for PyArg
[src]
impl From<i16> for PyArg
[src]
impl From<u16> for PyArg
[src]
impl From<i32> for PyArg
[src]
impl From<u32> for PyArg
[src]
impl From<i64> for PyArg
[src]
impl From<u64> for PyArg
[src]
impl From<f32> for PyArg
[src]
impl From<f64> for PyArg
[src]
impl From<PyTuple> for PyArg
[src]
impl From<PyList> for PyArg
[src]
impl<T> From<Vec<T>> for PyArg where
PyArg: From<T>,
[src]
PyArg: From<T>,
impl<K> From<PyDict<K>> for PyArg where
K: Eq + Hash + PyDictKey,
[src]
K: Eq + Hash + PyDictKey,
impl<K, V> From<HashMap<K, V>> for PyArg where
PyArg: From<V>,
K: Eq + Hash + PyDictKey,
[src]
PyArg: From<V>,
K: Eq + Hash + PyDictKey,