pub trait ReplicatedComponent: Component<Mutability = Mutable> {
const COMPONENT_ID: u16;
// Required methods
fn fields() -> Vec<ReplicatedField>;
fn read_fields(&self) -> Vec<FieldValue>;
fn apply_field(&mut self, index: usize, value: FieldValue) -> Result<()>;
fn from_fields(fields: &[FieldValue]) -> Result<Self>
where Self: Sized;
}Required Associated Constants§
const COMPONENT_ID: u16
Required Methods§
fn fields() -> Vec<ReplicatedField>
fn read_fields(&self) -> Vec<FieldValue>
fn apply_field(&mut self, index: usize, value: FieldValue) -> Result<()>
fn from_fields(fields: &[FieldValue]) -> Result<Self>where
Self: Sized,
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.