---
title: "McapSchema"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

⚠️ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
A schema definition that describes the structure of messages in an MCAP file.

Schemas define the data types and field structures used by messages in MCAP channels.
They provide the blueprint for interpreting message payloads, specifying field names,
types, and organization. Each schema is referenced by channels to indicate how their
messages should be decoded and understood.

See also [`archetypes.McapChannel`](https://rerun.io/docs/reference/types/archetypes/mcap_channel) for channels that reference these schemas,
[`archetypes.McapMessage`](https://rerun.io/docs/reference/types/archetypes/mcap_message) for the messages that conform to these schemas, and the
[MCAP specification](https://mcap.dev/) for complete format details.

## Fields
### Required
* `id`: [`SchemaId`](../components/schema_id.md)
* `name`: [`Text`](../components/text.md)
* `encoding`: [`Text`](../components/text.md)
* `data`: [`Blob`](../components/blob.md)


## Can be shown in
* [DataframeView](../views/dataframe_view.md)

## API reference links
 * 🌊 [C++ API docs for `McapSchema`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1McapSchema.html)
 * 🐍 [Python API docs for `McapSchema`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.McapSchema)
 * 🦀 [Rust API docs for `McapSchema`](https://docs.rs/rerun/latest/rerun/archetypes/struct.McapSchema.html)

## Example

### Simple MCAP schema

snippet: archetypes/mcap_schema_simple

