pub trait ArkheComponent:
__Sealed
+ Serialize
+ for<'de> Deserialize<'de>
+ 'static {
const TYPE_CODE: u32;
const SCHEMA_VERSION: u16;
// Provided methods
fn type_code() -> TypeCode { ... }
fn approx_size(&self) -> usize { ... }
}Expand description
Sealed marker trait for ECS Component types. Implementations are produced
only by #[derive(ArkheComponent)] — manual downstream impls are rejected
by the Sealed supertrait and the Runtime dylint gate.
Canonical bytes = postcard::to_stdvec(&value) (A17 succession).
Required Associated Constants§
Sourceconst SCHEMA_VERSION: u16
const SCHEMA_VERSION: u16
Monotone schema version. Bump on field addition (#[serde(default)]
paired); field removal / reorder forbidden.
Provided Methods§
Sourcefn approx_size(&self) -> usize
fn approx_size(&self) -> usize
Approximate payload size for quota tracking. Default returns
size_of::<Self>(); override for bytes::Bytes-carrying Components.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.