1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

gamestate analyser wip

This commit is contained in:
Robin Appelman 2019-12-06 18:58:30 +01:00
commit 5f6cfe077e
13 changed files with 379 additions and 9 deletions

View file

@ -32,6 +32,12 @@ impl From<ClassId> for usize {
#[derive(BitRead, PartialEq, Eq, Hash, Debug, Serialize, Deserialize, Clone, Display)]
pub struct ServerClassName(Rc<String>);
impl ServerClassName {
pub fn as_str(&self) -> &str {
self.0.as_str()
}
}
impl From<String> for ServerClassName {
fn from(value: String) -> Self {
Self(Rc::new(value))
@ -50,6 +56,12 @@ pub struct ServerClass {
)]
pub struct SendTableName(Rc<String>);
impl SendTableName {
pub fn as_str(&self) -> &str {
self.0.as_str()
}
}
impl From<String> for SendTableName {
fn from(value: String) -> Self {
Self(Rc::new(value))