mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-05-23 12:41:34 +00:00
Merge pull request #244 from alexcrichton/custom-section-new
Add a function to create a `CustomSection`
This commit is contained in:
commit
00cc0497f1
@ -287,6 +287,10 @@ pub struct CustomSection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl CustomSection {
|
impl CustomSection {
|
||||||
|
/// Creates a new custom section with the given name and payload
|
||||||
|
pub fn new(name: String, payload: Vec<u8>) -> CustomSection {
|
||||||
|
CustomSection { name, payload }
|
||||||
|
}
|
||||||
|
|
||||||
/// Name of the custom section
|
/// Name of the custom section
|
||||||
pub fn name(&self) -> &str {
|
pub fn name(&self) -> &str {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user