<commit_before>//! Contains definitions required to communicate with Qt with the use of `named types`.
//!
//! Provides definition of [`QMetaType`](enum.QMetaType.html) enum, that contains mapping of named types
//! and a trait [`QMetaTypable`](trait.QMetaTypable.html), that controls which types are able to be used in signals, slots or properties.

/// Provides a variant of enum for a type.
///
/// Only types that implement this, may be used as types in signals, slots or properties.
pub trait QMetaTypable {
    /// Returns an associate variant of QMetaType
    fn metatype() -> QMetaType;
}

impl QMetaTypable for i32 {
    fn metatype() -> QMetaType {
        QMetaType::Int
    }
}

impl QMetaTypable for String {
    fn metatype() -> QMetaType {
        QMetaType::QString
    }
}

/// Analogue of [`Qt::QMetaType::Type`](http://doc.qt.io/qt-5/qmetatype.html#Type-enum)
///<commit_msg>Fixed docs for qmetatype<commit_after>//! Contains definitions required to communicate with Qt with the use of `named types`.
//!
//! Provides definition of [`QMetaType`](enum.QMetaType.html) enum, that contains mapping of named types
//! and a trait [`QMetaTypable`](trait.QMetaTypable.html), that controls which types are able to be used in signals, slots or properties.

/// Provides an associated variant of enum for a type.
///
/// Only types that implement this, may be used as types in signals, slots or properties.
pub trait QMetaTypable {
    /// Returns an associate variant of QMetaType
    fn metatype() -> QMetaType;
}

impl QMetaTypable for i32 {
    fn metatype() -> QMetaType {
        QMetaType::Int
    }
}

impl QMetaTypable for String {
    fn metatype() -> QMetaType {
        QMetaType::QString
    }
}

/// Analogue of [`Qt::QMetaType::Type`](http://doc.qt.io/qt-5/qmetatype.html#Type-enum)
///
{'fraction_non_alphanumeric': 0.11927112092766427, 'fraction_numerical': 0.0033130866924351186, 'mean_word_length': 3.304038004750594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7268509', 'n_tokens_mistral': 552, 'n_tokens_neox': 542, 'n_words': 198}