use crate::abi::{Header, ManifestFlags, Side, Str};
#[repr(C)]
#[derive(Clone, Copy, Debug, bytemuck::Zeroable)]
pub struct ModInfo {
pub header: Header,
pub id: Str,
pub version: Str,
pub side: Side,
pub flags: ManifestFlags,
pub off: u8,
pub file: Str,
pub name: Str,
pub description: Str,
pub authors: *const Str,
pub author_count: usize,
pub license: Str,
pub homepage: Str,
pub replaced_by: Str,
}
impl_headed!(ModInfo);
impl ModInfo {
pub const EMPTY: Self = Self {
header: Header::of::<Self>(),
id: Str::EMPTY,
version: Str::EMPTY,
side: Side(0),
flags: ManifestFlags::NONE,
off: 0,
file: Str::EMPTY,
name: Str::EMPTY,
description: Str::EMPTY,
authors: core::ptr::null(),
author_count: 0,
license: Str::EMPTY,
homepage: Str::EMPTY,
replaced_by: Str::EMPTY,
};
}
unsafe impl Send for ModInfo {}
unsafe impl Sync for ModInfo {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct ModHandle(pub usize);
impl ModHandle {
pub const NONE: Self = Self(0);
}