Struct odra_ir::module::ModuleImpl
source · pub struct ModuleImpl { /* private fields */ }Expand description
Odra module implementation block.
Examples
impl MyModule {
#[odra(init)]
#[other_attribute]
pub fn set_initial_value(&self, value: u32) {
// initialization logic goes here
}
pub fn set_value(&self, value: u32) {
// logic goes here
}
}Implementations§
source§impl ModuleImpl
impl ModuleImpl
pub fn impl_items(&self) -> &[ImplItem]
pub fn ident(&self) -> &Ident
pub fn custom_impl_items(&self) -> Vec<&ImplItem>
pub fn get_public_method_iter(&self) -> impl Iterator<Item = &Method>
pub fn get_constructor_iter(&self) -> impl Iterator<Item = &Constructor>
pub fn public_custom_impl_items(&self) -> Vec<&ImplItem>
pub fn is_trait_implementation(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ModuleImpl
impl !Send for ModuleImpl
impl !Sync for ModuleImpl
impl Unpin for ModuleImpl
impl UnwindSafe for ModuleImpl
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