<commit_before>use super::{types, ids, layout, callbacks, controls, utils};

use std::fmt::Debug;
use std::hash::Hash;
use std::any::Any;

pub trait NativeId: Debug + Clone + Copy + PartialEq + Eq + PartialOrd + Ord + Hash + Into<usize> {}

// ==========================================================================================================

pub trait HasInner: Sized + 'static {
	type Inner: Sized;
	type Params: Sized;
	
	fn with_inner(inner: Self::Inner, params: Self::Params) -> Self;
	fn as_inner(&self) -> &Self::Inner;
	fn as_inner_mut(&mut self) -> &mut Self::Inner;
}

#[repr(C)]
pub struct MemberBase {
    pub id: ids::Id,
    pub visibility: types::Visibility,
    pub functions: MemberFunctions,
    
    pub handler_resize: Option<callbacks::Resize>,
}
#[repr(C)]
pub struct Member<T: MemberInner> {
	base: MemberBase,
    inner: T,
}
#[repr(C)]
pub struct MemberFunctions {
	_as_any: unsafe fn (&MemberBase) -> &Any,
    _as_any_mut : unsafe fn (&mut MemberBase) -> &mut Any,<commit_msg>Copy restriction removed (for now)<commit_after>use super::{types, ids, layout, callbacks, controls, utils};

use std::fmt::Debug;
use std::hash::Hash;
use std::any::Any;

pub trait NativeId: Debug + Clone + PartialEq + Eq + PartialOrd + Ord + Hash + Into<usize> {}

// ==========================================================================================================

pub trait HasInner: Sized + 'static {
	type Inner: Sized;
	type Params: Sized;
	
	fn with_inner(inner: Self::Inner, params: Self::Params) -> Self;
	fn as_inner(&self) -> &Self::Inner;
	fn as_inner_mut(&mut self) -> &mut Self::Inner;
}

#[repr(C)]
pub struct MemberBase {
    pub id: ids::Id,
    pub visibility: types::Visibility,
    pub functions: MemberFunctions,
    
    pub handler_resize: Option<callbacks::Resize>,
}
#[repr(C)]
pub struct Member<T: MemberInner> {
	base: MemberBase,
    inner: T,
}
#[repr(C)]
pub struct MemberFunctions {
	_as_any: unsafe fn (&MemberBase) -> &Any,
    _as_any_mut : unsafe fn (&mut MemberBase) -> &mut Any,
{'fraction_non_alphanumeric': 0.24288518155053976, 'fraction_numerical': 0.0, 'mean_word_length': 5.123123123123123, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '6770698', 'n_tokens_mistral': 657, 'n_tokens_neox': 649, 'n_words': 184}