PhoenixGenerator  3.4.0
Generate code from template files and projects in C++, Rust, Python and wrapped C++ to Python
Loading...
Searching...
No Matches
rust_type_utils.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : LGPL-3.0-only
5****************************************/
6
7#ifndef __RUST_TYPE_UTILS_H__
8#define __RUST_TYPE_UTILS_H__
9
10#include "PString.h"
11#include "PClassAttribute.h"
12
13PString getRustType(const PString & varType);
14bool getRustTypeIsCopy(const PString & varType);
16PString getRustTestValue(const PClassAttribute & attr);
17
18#endif
Describes a class attribute.
bool getRustTypeIsCopy(const PString &varType)
Say if the Rust type matching a pdata type implements Copy (so getters can return it by value instead...
PString getRustType(const PString &varType)
Get the Rust type matching a pdata type.
PString getRustTestValue(const PClassAttribute &attr)
Get a non-default Rust literal value of an attribute, to be used to exercise its setter/getter in gen...
PString getRustAttributeDefaultValue(const PClassAttribute &attr)
Get the Rust literal default value of an attribute, as written into its Default impl.