pub struct CodeSignature(/* private fields */);Expand description
Program Code Signature
The first 16 bytes of a VEX user program contains a code signature header, which has some basic metadata and startup flags for the program. This signature must be at the start of the binary for VExos to recognize our binary as a program.
A static instance of this type can be passed to the code_sig argument of the #[vexide::main]
macro to override the default code signature, or may be placed into the .code_signature linker
section if not using the macro.
Implementations§
Source§impl CodeSignature
impl CodeSignature
Sourcepub const fn new(
program_type: ProgramType,
owner: ProgramOwner,
options: ProgramOptions,
) -> Self
pub const fn new( program_type: ProgramType, owner: ProgramOwner, options: ProgramOptions, ) -> Self
Creates a new signature given a program type, owner, and flags.
Sourcepub const fn owner(&self) -> ProgramOwner
pub const fn owner(&self) -> ProgramOwner
Returns the program owner specified by this signature.
See ProgramOwner for more info.
Sourcepub const fn program_type(&self) -> ProgramType
pub const fn program_type(&self) -> ProgramType
Returns the program type specified by this signature.
See ProgramType for more info.
Sourcepub const fn options(&self) -> ProgramOptions
pub const fn options(&self) -> ProgramOptions
Returns the program startup options specified by this signature.
See ProgramOptions for more info.
Trait Implementations§
Source§impl Clone for CodeSignature
impl Clone for CodeSignature
Source§fn clone(&self) -> CodeSignature
fn clone(&self) -> CodeSignature
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeSignature
impl Debug for CodeSignature
Source§impl PartialEq for CodeSignature
impl PartialEq for CodeSignature
impl Copy for CodeSignature
impl Eq for CodeSignature
impl StructuralPartialEq for CodeSignature
Auto Trait Implementations§
impl Freeze for CodeSignature
impl RefUnwindSafe for CodeSignature
impl Send for CodeSignature
impl Sync for CodeSignature
impl Unpin for CodeSignature
impl UnwindSafe for CodeSignature
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)