[−][src]Struct lucet_module::ModuleData
The metadata (and some data) for a Lucet module.
The lifetime parameter exists to support zero-copy deserialization for the &str
and &[u8]
fields at the leaves of the structure. For a variant with owned types at the leaves, see
OwnedModuleData
.
The goal is for this structure to eventually include everything except the code for the guest functions themselves.
Methods
impl<'a> ModuleData<'a>
[src]
pub fn new(
linear_memory: Option<LinearMemorySpec<'a>>,
globals_spec: Vec<GlobalSpec<'a>>,
function_info: Vec<FunctionMetadata<'a>>,
import_functions: Vec<ImportFunction<'a>>,
export_functions: Vec<ExportFunction<'a>>,
signatures: Vec<Signature>,
features: ModuleFeatures
) -> Self
[src]
linear_memory: Option<LinearMemorySpec<'a>>,
globals_spec: Vec<GlobalSpec<'a>>,
function_info: Vec<FunctionMetadata<'a>>,
import_functions: Vec<ImportFunction<'a>>,
export_functions: Vec<ExportFunction<'a>>,
signatures: Vec<Signature>,
features: ModuleFeatures
) -> Self
pub fn heap_spec(&self) -> Option<&HeapSpec>
[src]
pub fn sparse_data(&self) -> Option<&SparseData<'a>>
[src]
pub fn globals_spec(&self) -> &[GlobalSpec<'a>]
[src]
pub fn function_info(&self) -> &[FunctionMetadata<'a>]
[src]
pub fn import_functions(&self) -> &[ImportFunction]
[src]
pub fn export_functions(&self) -> &[ExportFunction]
[src]
pub fn get_signature(&self, fn_id: FunctionIndex) -> &Signature
[src]
pub fn get_export_func_id(&self, name: &str) -> Option<FunctionIndex>
[src]
pub fn signatures(&self) -> &[Signature]
[src]
pub fn get_module_signature(&self) -> &[u8]
[src]
pub fn features(&self) -> &ModuleFeatures
[src]
pub fn patch_module_signature(
module_data_bin: &'a [u8],
module_signature: &[u8]
) -> Result<Vec<u8>, Error>
[src]
module_data_bin: &'a [u8],
module_signature: &[u8]
) -> Result<Vec<u8>, Error>
pub fn clear_module_signature(
module_data_bin: &'a [u8]
) -> Result<Vec<u8>, Error>
[src]
module_data_bin: &'a [u8]
) -> Result<Vec<u8>, Error>
pub fn serialize(&self) -> Result<Vec<u8>, Error>
[src]
Serialize to bincode
.
pub fn deserialize(buf: &'a [u8]) -> Result<ModuleData<'a>, Error>
[src]
Deserialize from bincode
.
Trait Implementations
impl<'a> Debug for ModuleData<'a>
[src]
impl<'a> Serialize for ModuleData<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de: 'a, 'a> Deserialize<'de> for ModuleData<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<'a> Send for ModuleData<'a>
impl<'a> Sync for ModuleData<'a>
impl<'a> Unpin for ModuleData<'a>
impl<'a> UnwindSafe for ModuleData<'a>
impl<'a> RefUnwindSafe for ModuleData<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Same<T> for T
type Output = T
Should always be Self