pub struct TraitMethod {
pub name: String,
pub sig: Signature,
pub zig_function: String,
pub body: Option<Block>,
pub zig_return_type: Option<ReturnType>,
pub is_constructor: bool,
pub is_destructor: bool,
}Expand description
A method within a trait implementation
Fields§
§name: StringMethod name (e.g., “add”)
sig: SignatureMethod signature
zig_function: StringZig function name that this method calls (e.g., “zig_add”)
body: Option<Block>Original method body (for complex wrapper logic)
zig_return_type: Option<ReturnType>Zig function’s actual return type (extracted from Zig code)
is_constructor: boolWhether this is a constructor (#[constructor]) - Phase 2
is_destructor: boolWhether this is a destructor (#[destructor]) - Phase 2
Trait Implementations§
Source§impl Clone for TraitMethod
impl Clone for TraitMethod
Source§fn clone(&self) -> TraitMethod
fn clone(&self) -> TraitMethod
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 moreAuto Trait Implementations§
impl Freeze for TraitMethod
impl RefUnwindSafe for TraitMethod
impl !Send for TraitMethod
impl !Sync for TraitMethod
impl Unpin for TraitMethod
impl UnwindSafe for TraitMethod
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