fn raise_if_none(&self, stmt: &Statement, field: &Field) -> Elements {
        let mut raise_if_none = Elements::new();
        let required_error = Variable::String(format!("{}: is a required field", field.name));

        raise_if_none.push(stmt!["if ", &stmt, " is None:"]);
        raise_if_none.push_nested(stmt!["raise Exception(", required_error, ")"]);

        raise_if_none
    }
/// Build a function that raises an exception if the given value `stmt` is None.
Build a function that raises an exception if the given value `stmt` is None.
Build a function that raises an exception if the given value ` stmt ` is None .
fn raise_if_none(&self, stmt: &Statement, field: &Field) -> Elements {
        let mut raise_if_none = Elements::new();
        let required_error = Variable::String(format!("{}: is a required field", field.name));
        raise_if_none.push(stmt!["if ", &stmt, " is None:"]);
        raise_if_none.push_nested(stmt!["raise Exception(", required_error, ")"]);
        raise_if_none
    }
fn raise_if_none ( & self , stmt : & Statement , field : & Field ) -> Elements { let mut raise_if_none = Elements :: new ( ) ; let required_error = Variable :: String ( format ! ( " " field name ) ) ; raise_if_none . push ( stmt ! [ " " stmt " " ] ) ; raise_if_none . push_nested ( stmt ! [ " " required_error " " ] ) ; raise_if_none }
Build a function that raises an exception if the given value `stmt` is None.
Build a function that raises an exception if the given value ` stmt ` is None .
&self
stmt
&Statement
field
&Field
&self
stmt
&Statement
field
&Field