use crate::types::{StringView, Version};
#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub struct PluginDescriptor {
pub name: StringView,
pub contract_name: StringView,
pub version: Version,
}
#[cfg(test)]
mod tests {
use core::mem::{align_of, offset_of, size_of};
use crate::plugin::plugin_descriptor::PluginDescriptor;
#[test]
fn layout_plugin_descriptor() {
assert_eq!(size_of::<PluginDescriptor>(), 48);
assert_eq!(align_of::<PluginDescriptor>(), 8);
assert_eq!(offset_of!(PluginDescriptor, name), 0);
assert_eq!(offset_of!(PluginDescriptor, contract_name), 16);
assert_eq!(offset_of!(PluginDescriptor, version), 32);
}
}