# MarkupConstructor

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/metadata/struct-markupconstructor/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct MarkupConstructor
```

A constructor with arguments. (The parameterless constructor of a class
is its `TypeInfo::default_constructor`; other types list it here with
no parameters.)

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L537)

## Members

- [`parameters`](#struct_field-parameters)
- [`parameter_info`](#struct_field-parameter_info)
- [`invoke`](#struct_field-invoke)
- [`emit`](#struct_field-emit)
- [`parameter_name`](#function-parameter_name)
- [`parameter_attributes`](#function-parameter_attributes)

<a id="struct_field-parameters"></a>

### parameters

```rust
parameters: &'static [TypeOf]
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L538)

<a id="struct_field-parameter_info"></a>

### parameter_info

```rust
parameter_info: &'static [MarkupParameter]
```

What the declaration states about each parameter beyond its type
(its name and attributes), by index. Empty when the constructor is
declared in the positional form `(A, B) => callable`, otherwise as
long as `parameters`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L543)

<a id="struct_field-invoke"></a>

### invoke

```rust
invoke: MarkupInvoke
```

Creates the instance from the arguments.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L545)

<a id="struct_field-emit"></a>

### emit

```rust
emit: CompilerMetadata<Option<MarkupEmit>>
```

The typed function the declaration generated for the constructor
(see `MarkupEmit`): `__markup_new_<n>(a0: A, ..) -> T`, where `T` is
the value type of the declared type (`MarkupType::value`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L549)

<a id="function-parameter_name"></a>

### parameter_name

```rust
fn parameter_name(self: &Self, index: usize) -> Option<&'static str>
```

The declared name of parameter `index`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L523)

<a id="function-parameter_attributes"></a>

### parameter_attributes

```rust
fn parameter_attributes(self: &Self, index: usize) -> &'static [MarkupAttribute]
```

The declared attributes of parameter `index`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L528)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
