pub struct Program {
pub magic: [u8; 4],
pub entry: Option<Entry>,
pub modules: Vec<Module>,
}
Fields§
§magic: [u8; 4]
§entry: Option<Entry>
§modules: Vec<Module>
Implementations§
Source§impl Program
impl Program
pub fn from_modules( entry: Option<Entry>, modules: Vec<Module>, ) -> SimpleResult<Self>
pub fn from_json(source: &str) -> Result<Self>
pub fn to_json(&self, pretty: bool) -> Result<String>
pub fn modules_map(&self) -> Vec<(usize, String)>
pub fn find_module(&self, path: &str) -> Option<&Module>
pub fn find_module_struct(&self, path: &str, id: &str) -> Option<&Struct>
pub fn find_struct(&self, id: &str) -> Option<&Struct>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Program
impl<'de> Deserialize<'de> for Program
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
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