feat: add native_model_id_str and native_model_version_str

This commit is contained in:
Vincent Herlemont
2023-12-17 10:37:38 +01:00
committed by Vincent Herlemont
parent 07c8900dde
commit 003d1f3b1d
4 changed files with 20 additions and 1 deletions
+2
View File
@@ -2,7 +2,9 @@ use crate::{DecodeResult, EncodeResult, Result};
pub trait Model: Sized {
fn native_model_id() -> u32;
fn native_model_id_str() -> &'static str;
fn native_model_version() -> u32;
fn native_model_version_str() -> &'static str;
// --------------- Decode ---------------
fn native_model_decode_body(data: Vec<u8>, id: u32) -> DecodeResult<Self>