Trait _Object

Source
pub trait _Object {
    // Required methods
    fn __repr__(&self) -> String;
    fn __str__(&self) -> String;
}
Expand description

the supreme _Object trait that its derived types should implement like all the functions from python

Required Methods§

Source

fn __repr__(&self) -> String

python repr(object)

Source

fn __str__(&self) -> String

python str(object)

Implementors§

Source§

impl _Object for Bool

Source§

impl _Object for Char

Source§

impl _Object for List

Source§

impl _Object for _String

Source§

impl<T> _Object for Float<T>
where T: Sized + Display,

Source§

impl<T> _Object for Int<T>
where T: Sized + Display,

object trait