[−][src]Struct melon::Program
The container for a program
You can load a Program
from a file or create one using the ProgramBuilder
Methods
impl Program
[src]
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Program>
[src]
Loads a MsgPack encoded and gzipped melon image from the given file
pub fn from_slice(vec: &[u8]) -> Result<Program>
[src]
Decodes a program from MsgPack encoded and gzipped image data
pub fn to_vec(&self) -> Result<Vec<u8>>
[src]
Encodes the program as MsgPack encoded and gzipped image data
pub fn save_as<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Saves the program as a MsgPack encoded and gzipped image to the given file
pub fn target_version(&self) -> &Version
[src]
The target version of the melon
API the program was compiled against
pub fn system_id(&self) -> &String
[src]
The ID of the System the program is compiled against
pub fn instructions(&self) -> &Vec<Instruction>
[src]
The instuctions of the program
pub fn mem_pages(&self) -> Option<u8>
[src]
(Optional) The minimum number of allocated memory pages (1 page = 1024 Byte)
pub fn entry_point(&self) -> Address
[src]
The entry address of the program
Trait Implementations
impl Clone for Program
[src]
impl Debug for Program
[src]
impl<'de> Deserialize<'de> for Program
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Program
[src]
Auto Trait Implementations
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,