Get the underlying memory type that this builder has been building. # Errors Returns an error if the configured memory type is invalid, for example if the maximum size is smaller than the minimum size.
(&self)
| 3351 | /// Returns an error if the configured memory type is invalid, for example |
| 3352 | /// if the maximum size is smaller than the minimum size. |
| 3353 | pub fn build(&self) -> Result<MemoryType> { |
| 3354 | self.validate()?; |
| 3355 | Ok(MemoryType { ty: self.ty }) |
| 3356 | } |
| 3357 | } |
| 3358 | |
| 3359 | /// A descriptor for a WebAssembly memory type. |