Struct mun_memory::StructTypeBuilder
source · pub struct StructTypeBuilder { /* private fields */ }
Expand description
A helper struct to create a struct type.
Implementations§
source§impl StructTypeBuilder
impl StructTypeBuilder
pub fn new(name: impl Into<String>) -> Self
sourcepub fn set_memory_kind(self, kind: StructMemoryKind) -> Self
pub fn set_memory_kind(self, kind: StructMemoryKind) -> Self
Sets the memory kind of the struct
sourcepub fn add_fields<N: Into<String>>(
self,
iter: impl IntoIterator<Item = (N, Type)>
) -> Self
pub fn add_fields<N: Into<String>>(
self,
iter: impl IntoIterator<Item = (N, Type)>
) -> Self
Adds a collection of fields to the struct