Struct cpp_to_rust_generator::cpp_method::CppMethod [] [src]

pub struct CppMethod {
    pub name: String,
    pub class_membership: Option<CppMethodClassMembership>,
    pub operator: Option<CppOperator>,
    pub return_type: CppType,
    pub arguments: Vec<CppFunctionArgument>,
    pub arguments_before_omitting: Option<Vec<CppFunctionArgument>>,
    pub allows_variadic_arguments: bool,
    pub include_file: String,
    pub origin_location: Option<CppOriginLocation>,
    pub template_arguments: Option<TemplateArgumentsDeclaration>,
    pub template_arguments_values: Option<Vec<CppType>>,
    pub declaration_code: Option<String>,
    pub inheritance_chain: Vec<CppBaseSpecifier>,
    pub is_fake_inherited_method: bool,
    pub doc: Option<CppMethodDoc>,
    pub is_ffi_whitelisted: bool,
    pub is_unsafe_static_cast: bool,
    pub is_direct_static_cast: bool,
}

Information about a C++ method

Fields

Identifier. For class methods, this field includes only the method's own name. For free functions, this field also includes namespaces (if any).

Additional information about a class member function or None for free functions

If the method is a C++ operator, indicates its kind

Return type of the method. Return type is reported as void for constructors and destructors.

List of the method's arguments

If Some, the method is derived from another method by omitting arguments, and this field contains all arguments of the original method.

Whether the argument list is terminated with "..."

File name of the include file where the method is defined (without full path)

Exact location of declaration of the method. Can be None if the method is generated automatically and doesn't have corresponding C++ declaration.

Names of the method's template arguments. None if this is not a template method. If the method belongs to a template class, the class's template arguments are not included here.

For an instantiated template method, this field contains the types used for instantiation. For example, T QObject::findChild<T>() would have no template_arguments_values because it's not instantiated, and QWidget* QObject::findChild<QWidget*>() would have QWidget* type in template_arguments_values.

C++ code of the method's declaration. None if the method was not explicitly declared.

List of base classes this method was inferited from. The first item is the most base class.

If true, this method was not declared in headers but added in the generator's preprocessing step.

C++ documentation data for this method

If true, FFI generator skips some checks

If true, this is an unsafe (from base to derived) static_cast wrapper.

If true, this is a wrapper of static_cast between a class and its direct base.

Methods

impl CppMethod
[src]

[src]

Checks if two methods have exactly the same set of input argument types

[src]

Creates FFI method signature for this method:

  • converts all types to FFI types;
  • adds "this" argument explicitly if present;
  • adds "output" argument for return value if allocation_place is Stack.

[src]

Generates the FFI function signature for this method.

[src]

Returns fully qualified C++ name of this method, i.e. including namespaces and class name (if any). This method is not suitable for code generation.

[src]

Returns the identifier this method would be presented with in Qt documentation.

[src]

Returns short text representing values in this method (only for debugging output).

[src]

Returns debugging output for inheritance_chain content.

[src]

Returns name of the class this method belongs to, if any.

[src]

Returns true if this method is a constructor.

[src]

Returns true if this method is a destructor.

[src]

A convenience method. Returns class_membership if the method is a constructor, and None otherwise.

[src]

Returns the identifier that should be used in QObject::connect to specify this signal or slot.

[src]

Returns true if this method is an operator.

[src]

Returns collection of all types found in the signature of this method, including argument types, return type and type of this implicit parameter.

Trait Implementations

impl Debug for CppMethod
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for CppMethod
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for CppMethod
[src]

impl Clone for CppMethod
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Hash for CppMethod
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for CppMethod

impl Sync for CppMethod