Struct cpython::PyFloat [] [src]

pub struct PyFloat(_);

Represents a Python float object.

You can usually avoid directly working with this type by using ToPyObject and extract with f32/f64.

Methods

impl PyFloat
[src]

Creates a new Python float object.

Gets the value of this float.

Trait Implementations

impl ToPyObject for PyFloat
[src]

Identity conversion: allows using existing PyObject instances where T: ToPyObject is expected.

Converts self into a Python object.

Converts self into a Python object. Read more

Converts self into a Python object and calls the specified closure on the native FFI pointer underlying the Python object. Read more

impl<'source> FromPyObject<'source> for PyFloat
[src]

Extracts Self from the source PyObject.

impl<'source> FromPyObject<'source> for &'source PyFloat
[src]

Extracts Self from the source PyObject.

impl PythonObject for PyFloat
[src]

Casts the Python object to PyObject.

Casts the Python object to PyObject.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

Unchecked downcast from PyObject to Self. Undefined behavior if the input object does not have the expected type.

impl PythonObjectWithCheckedDowncast for PyFloat
[src]

Cast from PyObject to a concrete Python object type.

Cast from PyObject to a concrete Python object type.

impl PythonObjectWithTypeObject for PyFloat
[src]

Retrieves the type object for this Python object type.