pub struct BamlModule {
pub classes: Vec<BamlClass>,
pub functions: Vec<BamlFunction>,
}Expand description
All parsed items from BAML source files.
Fields§
§classes: Vec<BamlClass>§functions: Vec<BamlFunction>Implementations§
Source§impl BamlModule
impl BamlModule
Sourcepub fn parse_source(&mut self, source: &str)
pub fn parse_source(&mut self, source: &str)
Parse a single BAML source string.
Sourcepub fn find_class(&self, name: &str) -> Option<&BamlClass>
pub fn find_class(&self, name: &str) -> Option<&BamlClass>
Find a class by name.
Sourcepub fn find_function(&self, name: &str) -> Option<&BamlFunction>
pub fn find_function(&self, name: &str) -> Option<&BamlFunction>
Find a function by name.
Trait Implementations§
Source§impl Clone for BamlModule
impl Clone for BamlModule
Source§fn clone(&self) -> BamlModule
fn clone(&self) -> BamlModule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BamlModule
impl Debug for BamlModule
Source§impl Default for BamlModule
impl Default for BamlModule
Source§fn default() -> BamlModule
fn default() -> BamlModule
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BamlModule
impl RefUnwindSafe for BamlModule
impl Send for BamlModule
impl Sync for BamlModule
impl Unpin for BamlModule
impl UnsafeUnpin for BamlModule
impl UnwindSafe for BamlModule
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