fn literal_value(lit: &cddl_cat::ivt::Literal) -> PyResult<PyObject> {
    use cddl_cat::ivt::Literal::*;

    let gil = Python::acquire_gil();
    let py = gil.python();

    match lit {
        Bool(b) => Ok(b.to_object(py)),
        Int(i) => Ok(i.to_object(py)),
        Float(f) => Ok(f.to_object(py)),
        Text(s) => Ok(s.to_object(py)),
        Bytes(b) => Ok(b.to_object(py)),
    }
}
// Convert a Node::Literal into a Python object of the expected type.
Convert a Node::Literal into a Python object of the expected type.
Convert a Node :: Literal into a Python object of the expected type .
fn literal_value(lit: &cddl_cat::ivt::Literal) -> PyResult<PyObject> {
    use cddl_cat::ivt::Literal::*;
    let gil = Python::acquire_gil();
    let py = gil.python();
    match lit {
        Bool(b) => Ok(b.to_object(py)),
        Int(i) => Ok(i.to_object(py)),
        Float(f) => Ok(f.to_object(py)),
        Text(s) => Ok(s.to_object(py)),
        Bytes(b) => Ok(b.to_object(py)),
    }
}
fn literal_value ( lit : & cddl_cat :: ivt :: Literal ) -> PyResult < PyObject > { use cddl_cat :: ivt :: Literal :: * ; let gil = Python :: acquire_gil ( ) ; let py = gil . python ( ) ; match lit { Bool ( b ) => Ok ( b . to_object ( py ) ) , Int ( i ) => Ok ( i . to_object ( py ) ) , Float ( f ) => Ok ( f . to_object ( py ) ) , Text ( s ) => Ok ( s . to_object ( py ) ) , Bytes ( b ) => Ok ( b . to_object ( py ) ) , } }
Convert a Node::Literal into a Python object of the expected type.
Convert a Node :: Literal into a Python object of the expected type .
lit
&cddl_cat::ivt::Literal
lit
&cddl_cat::ivt::Literal