pub struct MethodDef {
pub name: String,
pub params: Vec<FunctionParameter>,
pub when_clause: Option<Box<Expr>>,
pub return_type: Option<TypeAnnotation>,
pub body: Vec<Statement>,
pub is_async: bool,
}Fields§
§name: StringMethod name
params: Vec<FunctionParameter>Method parameters
when_clause: Option<Box<Expr>>Optional when clause for conditional method definitions
return_type: Option<TypeAnnotation>Optional return type annotation
body: Vec<Statement>Method body
is_async: boolWhether this is an async method
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MethodDef
impl<'de> Deserialize<'de> for MethodDef
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
impl StructuralPartialEq for MethodDef
Auto Trait Implementations§
impl Freeze for MethodDef
impl RefUnwindSafe for MethodDef
impl Send for MethodDef
impl Sync for MethodDef
impl Unpin for MethodDef
impl UnsafeUnpin for MethodDef
impl UnwindSafe for MethodDef
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