Available languages: [Python](https://databento.com/docs/api-historical/helpers/record-ref-rtype.python.md) · [C++](https://databento.com/docs/api-historical/helpers/record-ref-rtype.cpp.md) · [Rust](https://databento.com/docs/api-historical/helpers/record-ref-rtype.rust.md) · [HTTP](https://databento.com/docs/api-historical/helpers/record-ref-rtype.http.md)

Source: https://databento.com/docs/api-historical/helpers/record-ref-rtype


### RecordRef::rtype

Get the record's record type enum which can be used for `match` expressions with different handling for different types of records.

#### API method

```rust
pub fn rtype(&self) -> dbn::Result<RType>;
```

#### Returns

`RType`

This function returns an error if the header contains an unknown `RType`.
