pub struct SwiftFunc {
pub name: String,
pub params: Vec<SwiftParam>,
pub return_type: SwiftType,
pub body: Vec<SwiftStmt>,
pub is_public: bool,
pub is_private: bool,
pub throws: bool,
pub is_async: bool,
pub is_static: bool,
pub is_mutating: bool,
pub generic_params: Vec<String>,
pub where_clause: Option<String>,
}Expand description
A Swift function (or method) declaration.
Fields§
§name: StringFunction name
params: Vec<SwiftParam>Parameter list
return_type: SwiftTypeReturn type (defaults to Void)
body: Vec<SwiftStmt>Function body statements
is_public: boolWhether the function is public
is_private: boolWhether the function is private
throws: boolWhether the function can throw
is_async: boolWhether the function is async
is_static: boolWhether the function is static
is_mutating: boolWhether the function is mutating
generic_params: Vec<String>Generic type parameters: <T: Equatable, U>
where_clause: Option<String>Where clause
Implementations§
Trait Implementations§
impl StructuralPartialEq for SwiftFunc
Auto Trait Implementations§
impl Freeze for SwiftFunc
impl RefUnwindSafe for SwiftFunc
impl Send for SwiftFunc
impl Sync for SwiftFunc
impl Unpin for SwiftFunc
impl UnsafeUnpin for SwiftFunc
impl UnwindSafe for SwiftFunc
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