#[repr(C)]pub struct ecs_unit_desc_t {
pub entity: u64,
pub symbol: *const i8,
pub quantity: u64,
pub base: u64,
pub over: u64,
pub translation: ecs_unit_translation_t,
pub prefix: u64,
}Expand description
Used with ecs_unit_init.
Fields§
§entity: u64Existing entity to associate with unit (optional)
symbol: *const i8Unit symbol, e.g. “m”, “%”, “g”. (optional)
quantity: u64Unit quantity, e.g. distance, percentage, weight. (optional)
base: u64Base unit, e.g. “meters” (optional)
over: u64Over unit, e.g. “per second” (optional)
translation: ecs_unit_translation_tTranslation to apply to derived unit (optional)
prefix: u64Prefix indicating order of magnitude relative to the derived unit. If set together with “translation”, the values must match. If translation is not set, setting prefix will autopopulate it. Additionally, setting the prefix will enforce that the symbol (if set) is consistent with the prefix symbol + symbol of the derived unit. If the symbol is not set, it will be auto populated.
Trait Implementations§
Source§impl Clone for ecs_unit_desc_t
impl Clone for ecs_unit_desc_t
Source§fn clone(&self) -> ecs_unit_desc_t
fn clone(&self) -> ecs_unit_desc_t
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ecs_unit_desc_t
impl Debug for ecs_unit_desc_t
impl Copy for ecs_unit_desc_t
Auto Trait Implementations§
impl Freeze for ecs_unit_desc_t
impl RefUnwindSafe for ecs_unit_desc_t
impl !Send for ecs_unit_desc_t
impl !Sync for ecs_unit_desc_t
impl Unpin for ecs_unit_desc_t
impl UnwindSafe for ecs_unit_desc_t
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more