pub struct Builder<'a> { /* private fields */ }Expand description
The builder of the proka executable.
Implementations§
Source§impl<'a> Builder<'a>
impl<'a> Builder<'a>
Set up the author.
Will return error if length is > 32.
Sourcepub fn set_name(&mut self, name: &str) -> Result<(), Error>
pub fn set_name(&mut self, name: &str) -> Result<(), Error>
Set up the program name.
Will return error if length is > 32.
Sourcepub fn append(
&mut self,
data: &'a [u8],
name: &str,
is_loadable: bool,
is_execable: bool,
)
pub fn append( &mut self, data: &'a [u8], name: &str, is_loadable: bool, is_execable: bool, )
Append a section and specify its name.
§Arguments
data: The data that you want to append;name: The section name;is_loadable: Assign is this loadable section or not;is_execable: Assign is this executable section or not;
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Builder<'a>
impl<'a> RefUnwindSafe for Builder<'a>
impl<'a> Send for Builder<'a>
impl<'a> Sync for Builder<'a>
impl<'a> Unpin for Builder<'a>
impl<'a> UnsafeUnpin for Builder<'a>
impl<'a> UnwindSafe for Builder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more