# MarkupType

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

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

```rust
struct MarkupType
```

The markup metadata of a type. Built by the declaration macros as
constant data; see the module documentation.

A `MarkupType` is built only through `MarkupType::new` and the struct
update syntax (`MarkupType { events: .., ..MarkupType::new(name, kind, module_path!()) }`):
its fields grow with the compiler metadata of the markup compiler, and an
added field is not a breaking change of the API (docs/release.md, "API
stability").

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

## Members

- [`name`](#struct_field-name)
- [`explicit_namespace`](#struct_field-explicit_namespace)
- [`module_path`](#struct_field-module_path)
- [`kind`](#struct_field-kind)
- [`handles`](#struct_field-handles)
- [`nullable`](#struct_field-nullable)
- [`type_info`](#struct_field-type_info)
- [`base`](#struct_field-base)
- [`interfaces`](#struct_field-interfaces)
- [`generic`](#struct_field-generic)
- [`content_property`](#struct_field-content_property)
- [`parse`](#struct_field-parse)
- [`constructors`](#struct_field-constructors)
- [`properties`](#struct_field-properties)
- [`indexers`](#struct_field-indexers)
- [`property_attributes`](#struct_field-property_attributes)
- [`methods`](#struct_field-methods)
- [`fields`](#struct_field-fields)
- [`static_properties`](#struct_field-static_properties)
- [`events`](#struct_field-events)
- [`enum_members`](#struct_field-enum_members)
- [`is_flags`](#struct_field-is_flags)
- [`enum_from_value`](#struct_field-enum_from_value)
- [`enum_to_value`](#struct_field-enum_to_value)
- [`enum_i32_factory`](#struct_field-enum_i32_factory)
- [`attributes`](#struct_field-attributes)
- [`notify_property_changed`](#struct_field-notify_property_changed)
- [`this`](#struct_field-this)
- [`value`](#struct_field-value)
- [`owner_rust_name`](#struct_field-owner_rust_name)
- [`value_types`](#struct_field-value_types)
- [`new`](#function-new)
- [`namespace`](#function-namespace)
- [`full_name`](#function-full_name)
- [`handle`](#function-handle)
- [`find_property`](#function-find_property)
- [`find_indexer`](#function-find_indexer)
- [`base_type`](#function-base_type)
- [`find_property_attributes`](#function-find_property_attributes)
- [`find_methods`](#function-find_methods)
- [`find_field`](#function-find_field)
- [`find_static_property`](#function-find_static_property)
- [`find_event`](#function-find_event)
- [`find_attribute`](#function-find_attribute)
- [`find_enum_member`](#function-find_enum_member)
- [`find_enum_member_of`](#function-find_enum_member_of)
- [`register`](#function-register)
- [`register_all`](#function-register_all)
- [`register_table`](#function-register_table)
- [`register_used`](#function-register_used)
- [`register_handle`](#function-register_handle)
- [`find`](#function-find)
- [`find_by_handle`](#function-find_by_handle)
- [`find_by_nullable_handle`](#function-find_by_nullable_handle)
- [`find_by_type_info`](#function-find_by_type_info)
- [`registered_types`](#function-registered_types)

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

### name

```rust
name: &'static str
```

The type name, without namespace, as markup spells it.

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

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

### explicit_namespace

```rust
explicit_namespace: Option<&'static str>
```

The dotted namespace, when it is not the namespace registered for
`module_path` (types that mirror runtime library
types state `"System"` here).

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

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

### module_path

```rust
module_path: &'static str
```

The Rust module that declares the type (`module_path!()`).

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

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

### kind

```rust
kind: MarkupTypeKind
```



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

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

### handles

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

The Rust types values of this type are held in, the untyped
(canonical) form first: `[Ref<T>, Option<Ref<T>>]` for a class,
`[T, Rc<T>, Option<Rc<T>>]` for a reference type, `[T]` for a
value type (its nullable form `Option<T>` is a type of its own, as
in the managed original), `[Rc<dyn I>, Option<Rc<dyn I>>]` for a
contract. Empty for static types.

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

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

### nullable

```rust
nullable: Option<TypeOf>
```

The nullable form of a value type or enumeration (`Option<T>`), which
is a type of its own (the `Nullable<T>` of the managed original).
`None` for every other kind of type.

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

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

### type_info

```rust
type_info: Option<fn() -> &'static crate::TypeInfo>
```

The class of the object model this metadata belongs to, if any.

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

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

### base

```rust
base: Option<TypeOf>
```

The base type (by one of its handles). Classes of the object model
leave this empty: their base is `TypeInfo::base_type`.

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

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

### interfaces

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

The contracts the type implements (by their handles), in addition
to the ones of its base type.

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

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

### generic

```rust
generic: Option<MarkupGeneric>
```



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

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

### content_property

```rust
content_property: Option<&'static str>
```

The name of the content property (the `[Content]` attribute of the
managed original). Inherited by deriving types.

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

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

### parse

```rust
parse: Option<MarkupInvoke>
```

Converts text to a value of the type: `(text) -> value`. The
`Parse(string)` method of the managed original.

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

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

### constructors

```rust
constructors: &'static [MarkupConstructor]
```



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

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

### properties

```rust
properties: &'static [MarkupProperty]
```



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

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

### indexers

```rust
indexers: &'static [MarkupIndexer]
```

The indexers the type declares (not the ones of its base types), in
declaration order.

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

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

### property_attributes

```rust
property_attributes: &'static [(&'static str, &'static [MarkupAttribute])]
```

Attributes of REGISTERED properties (styled, direct, attached) the
type declares or owns, by property name. Registered properties need
no declaration; this only carries what the property system does not
know about them (`[DependsOn]`, `[ResolveByName]`,
`[InheritDataTypeFromItems]`, `[TemplateContent]`, ...).

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

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

### methods

```rust
methods: &'static [MarkupMethod]
```



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

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

### fields

```rust
fields: &'static [MarkupField]
```

The static fields and constants (`static readonly` / `const` of the
managed original).

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

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

### static_properties

```rust
static_properties: &'static [MarkupProperty]
```

The static properties (`static T Name { get; set; }` of the managed
original): the accessors take no instance, `get` is `() -> value`
and `set` is `(value)`.

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

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

### events

```rust
events: &'static [MarkupEvent]
```



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

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

### enum_members

```rust
enum_members: &'static [MarkupEnumMember]
```



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

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

### is_flags

```rust
is_flags: bool
```

Whether an enumeration is a set of flags.

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

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

### enum_from_value

```rust
enum_from_value: Option<fn(i64) -> Option<crate::BoxedValue>>
```

Converts a numeric value to a value of the enumeration: the cast
`(TEnum)value` of the managed original. For a plain enumeration the
value must be the value of a member; for a set of flags any
combination of the bits of its members.

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

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

### enum_to_value

```rust
enum_to_value: Option<fn(&dyn crate::AnyValue) -> Option<i64>>
```

The numeric value of a value of the enumeration: the cast
`(int)value` of the managed original. `None` for a value that is not
of the enumeration type.

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

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

### enum_i32_factory

```rust
enum_i32_factory: CompilerMetadata<Option<&'static str>>
```

Explicit associated function `fn(i32) -> enum value` on the public metadata
carrier, for unnamed numeric literals of an open plain enumeration.
Declares support for every signed Int32 value; absent for closed enums.
Compiler metadata names the typed function; it never guesses a constructor.

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

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

### attributes

```rust
attributes: &'static [MarkupAttribute]
```



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

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

### notify_property_changed

```rust
notify_property_changed: Option<fn(&dyn crate::AnyValue) -> Option<&dyn crate::data::model::INotifyPropertyChanged>>
```

Views an untyped value of this type as a source of property change
notifications (the `INotifyPropertyChanged` of the managed original),
for types that are not classes of the object model: view models.
Bindings resolved through metadata (reflection bindings, compiled
bindings built at run time) subscribe through it; `None` means the
properties of the type are read once.

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

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

### this

```rust
this: CompilerMetadata<Option<TypeOf>>
```

The Rust type instance members receive (`&This`): the `this:` of the
declaration, else the declared type (`Ref<Class>` for a class). The
typed functions of the instance members (`MarkupEmit`) take it.

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

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

### value

```rust
value: CompilerMetadata<Option<TypeOf>>
```

The Rust type of a value of the type as its constructors and its
`Parse` return it, and so their typed functions (`MarkupEmit`):
the instance type when the declaration states `this:`, else the
first of its handles, else the declared type (`Rc<dyn Trait>` for a
contract). `Ref<Class>` for a class.

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

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

### owner_rust_name

```rust
owner_rust_name: CompilerMetadata<Option<fn() -> &'static str>>
```

The actual Rust declaration that owns the typed metadata functions.
It can differ from `this`/`value` for external-model descriptor carriers.
Compiler-only, like the typed function and public-path tables.

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

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

### value_types

```rust
value_types: Option<fn() -> ()>
```

Registers the declared type with the untyped value conversions when the metadata
becomes known (#566): the `ValueTypeRegistration`
of the type, when it has one, made a used type (`ValueTypes::register_used`).
The declaration macros state it; it does nothing for a type without registrations. It
runs once, when the metadata is first registered: as the value type of a property of a
registered type, as a type of an application, or with the tables of types.

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

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

### new

```rust
const fn new(name: &'static str, kind: MarkupTypeKind, module_path: &'static str) -> Self
```

Metadata that states nothing but the name and kind of the type.

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

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

### namespace

```rust
fn namespace(self: &Self) -> &'static str
```

The dotted, markup-facing namespace of the type.

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

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

### full_name

```rust
fn full_name(self: &Self) -> String
```

The namespace-qualified name of the type.

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

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

### handle

```rust
fn handle(self: &Self) -> Option<ValueType>
```

The untyped (canonical) handle type of the type, if it has values.

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

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

### find_property

```rust
fn find_property(self: &Self, name: &str) -> Option<&'static MarkupProperty>
```

The plain property `name` declared by this type (not by its base
types).

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

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

### find_indexer

```rust
fn find_indexer(self: &Self, parameter_count: usize) -> Option<&'static MarkupIndexer>
```

The indexer this type declares (not its base types) that takes
`parameter_count` index arguments.

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

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

### base_type

```rust
fn base_type(self: &Self) -> Option<&'static MarkupType>
```

The registered metadata of the base type (`base`): for
a class of the object model the metadata of the nearest base class
that has any, otherwise the registered type that the base handle
belongs to. This is how untyped code walks the hierarchy of a type,
as reflection walks base classes.

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

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

### find_property_attributes

```rust
fn find_property_attributes(self: &Self, name: &str) -> &'static [MarkupAttribute]
```

The attributes this type declares for its registered property `name`.

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

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

### find_methods

```rust
fn find_methods<'a>(self: &Self, name: &'a str) -> impl Iterator<Item = &'static MarkupMethod> + 'a
```

The methods named `name` declared by this type.

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

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

### find_field

```rust
fn find_field(self: &Self, name: &str) -> Option<&'static MarkupField>
```

The static field `name` declared by this type.

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

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

### find_static_property

```rust
fn find_static_property(self: &Self, name: &str) -> Option<&'static MarkupProperty>
```

The static property `name` declared by this type.

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

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

### find_event

```rust
fn find_event(self: &Self, name: &str) -> Option<&'static MarkupEvent>
```

The event `name` declared by this type.

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

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

### find_attribute

```rust
fn find_attribute(self: &Self, name: &str) -> Option<&'static MarkupAttribute>
```

The attribute `name` of the type.

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

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

### find_enum_member

```rust
fn find_enum_member(self: &Self, name: &str, ignore_case: bool) -> Option<&'static MarkupEnumMember>
```

The enumeration member `name`; `ignore_case` as the managed
`Enum.Parse(.., ignoreCase)`.

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

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

### find_enum_member_of

```rust
fn find_enum_member_of(self: &Self, value: &dyn crate::AnyValue) -> Option<&'static MarkupEnumMember>
```

The first enumeration member that `value` (a value of the enumeration
type) is: the member with its numeric value. `None` for a value of
another type and for a combination of flags that is no member.

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

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

### register

```rust
fn register(type_: &'static MarkupType)
```

Adds a type to the process-wide table of types with markup metadata,
making it discoverable with `find` and
`find_by_handle`. Registering a type again
does nothing.

Always registers. An application registers its own types with this
function; a crate of the framework registers its table of types from
its `register_types()` function with
`register_table`. The metadata of a class of
the object model needs no registration to be reachable from its
runtime type (`TypeInfo::markup`).

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

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

### register_all

```rust
fn register_all(types: &[&'static MarkupType])
```

Registers several types; see `register`.

Always registers. An application registers its own types with this
function or `register`; a crate of the framework
registers its table of types with `register_table`.

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

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

### register_table

```rust
fn register_table(types: &[&'static MarkupType])
```

Registers the table of types of a crate of the framework, at start-up
from the crate's `register_types()` function; as
`register_all`. Without the feature
`type-tables` the table is trimmed: this does nothing, and what only
the table reaches is left out of the binary. An application registers
its own types with `register` or
`register_all`, which always register.

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

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

### register_used

```rust
fn register_used(type_: &'static MarkupType)
```

Registers the metadata of a type that is used: the value type of a property, when the
property is registered (`ferro_property!`). What finds metadata
by handle (the text of an enumeration member, the parsing of text) then knows the type
with the tables of types trimmed. With `type-tables` the tables already hold
every type, and this does nothing.

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

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

### register_handle

```rust
fn register_handle<H: 'static>(type_: &'static MarkupType)
```

Registers the Rust type `H` as one more handle of the registered type `type_`: a
type of another crate whose values are values of `type_` (a wrapper a property
holds the value in), next to the `handles` the declaration lists.
The crate that declares `H` also registers the casts between `H` and the handles
of the type (`ValueTypes::register_cast`). A handle that is already known keeps
its type.

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

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

### find

```rust
fn find(namespace: &str, name: &str) -> Option<&'static MarkupType>
```

Finds a registered type by namespace and name.

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

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

### find_by_handle

```rust
fn find_by_handle(handle: TypeId) -> Option<&'static MarkupType>
```

Finds the registered type that values of the Rust type `handle` are
values of (any of its `handles`).

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

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

### find_by_nullable_handle

```rust
fn find_by_nullable_handle(handle: TypeId) -> Option<&'static MarkupType>
```

Finds the registered value type or enumeration whose nullable form
(`nullable`) is the Rust type `handle`.

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

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

### find_by_type_info

```rust
fn find_by_type_info(type_: &'static TypeInfo) -> Option<&'static MarkupType>
```

Finds the registered metadata that belongs to the runtime type
`type_` (`type_info`): the metadata of a static
type declared with `ferro_markup_type!(static X { type_info: X, .. })`.
(The metadata of a class is its `TypeInfo::markup`.)

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

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

### registered_types

```rust
fn registered_types() -> Vec<&'static MarkupType>
```

Every registered type, in registration order.

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

## 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`
- `Debug`

## Availability

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