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 Freeze for ModuleImpl
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more