
use std::fmt::Debug;
use std::str::FromStr;

pub trait RObject {
 #[doc(hidden)] fn td_name(&self) -> &'static str;
 fn td_type(&self) -> TDType; // convert TDLib type to rust enum TDType
 fn to_json(&self) -> String;
}

/// This class is a base class for all TDLib TL-objects.
/// This parent class is not important and will not be implemented for every class.
trait TlObject: Debug + Clone {}

/// TDLib all class name mappers
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
pub enum TDType {
  {% for name in clz_names %}{{ name }},
  {% endfor %}
}
