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

Methods

impl PyArg
[src]

Trait Implementations

impl Clone for PyArg
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for PyArg
[src]

Formats the value using the given formatter.

impl PartialEq for PyArg
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> From<&'a str> for PyArg
[src]

Performs the conversion.

impl From<String> for PyArg
[src]

Performs the conversion.

impl From<PyString> for PyArg
[src]

Performs the conversion.

impl From<bool> for PyArg
[src]

Performs the conversion.

impl<'a> From<&'a bool> for PyArg
[src]

Performs the conversion.

impl From<PyBool> for PyArg
[src]

Performs the conversion.

impl From<i8> for PyArg
[src]

Performs the conversion.

impl From<u8> for PyArg
[src]

Performs the conversion.

impl From<i16> for PyArg
[src]

Performs the conversion.

impl From<u16> for PyArg
[src]

Performs the conversion.

impl From<i32> for PyArg
[src]

Performs the conversion.

impl From<u32> for PyArg
[src]

Performs the conversion.

impl From<i64> for PyArg
[src]

Performs the conversion.

impl From<u64> for PyArg
[src]

Performs the conversion.

impl From<f32> for PyArg
[src]

Performs the conversion.

impl From<f64> for PyArg
[src]

Performs the conversion.

impl From<PyTuple> for PyArg
[src]

Performs the conversion.

impl From<PyList> for PyArg
[src]

Performs the conversion.

impl<T> From<Vec<T>> for PyArg where
    PyArg: From<T>, 
[src]

Performs the conversion.

impl<K> From<PyDict<K>> for PyArg where
    K: Eq + Hash + PyDictKey, 
[src]

Performs the conversion.

impl<K, V> From<HashMap<K, V>> for PyArg where
    PyArg: From<V>,
    K: Eq + Hash + PyDictKey, 
[src]

Performs the conversion.