Trait veloren_common::terrain::sprite::magic::Attribute

source ·
pub trait Attribute: Default + Sized {
    type Error: Debug;

    const INDEX: usize;
    const BITS: u8;

    // Required methods
    fn from_bits(bits: u16) -> Result<Self, Self::Error>;
    fn into_bits(self) -> u16;
}

Required Associated Types§

source

type Error: Debug

The error that might occur when decoding the attribute from bits.

Required Associated Constants§

source

const INDEX: usize

The unique index assigned to this attribute, used to index offset arrays.

source

const BITS: u8

The number of bits required to represent this attribute.

Required Methods§

source

fn from_bits(bits: u16) -> Result<Self, Self::Error>

source

fn into_bits(self) -> u16

Object Safety§

This trait is not object safe.

Implementors§