pub struct FunctionType<'ctx> { /* private fields */ }Expand description
A Swift function type.
Implementations§
Source§impl<'ctx> FunctionType<'ctx>
impl<'ctx> FunctionType<'ctx>
Sourcepub fn parameters(&self) -> Vec<FunctionParam<'ctx>>
pub fn parameters(&self) -> Vec<FunctionParam<'ctx>>
Get the parameters of this function type.
Sourcepub fn return_type(&self) -> Option<TypeRef<'ctx>>
pub fn return_type(&self) -> Option<TypeRef<'ctx>>
Get the return type of this function.
Sourcepub fn is_throwing(&self) -> bool
pub fn is_throwing(&self) -> bool
Check if this function throws.
Sourcepub fn thrown_error_type(&self) -> Option<TypeRef<'ctx>>
pub fn thrown_error_type(&self) -> Option<TypeRef<'ctx>>
Get the thrown error type if this function has typed throws.
Sourcepub fn convention(&self) -> FunctionConvention
pub fn convention(&self) -> FunctionConvention
Get the calling convention of this function.
Sourcepub fn is_escaping(&self) -> bool
pub fn is_escaping(&self) -> bool
Check if this function type escapes.
Sourcepub fn is_autoclosure(&self) -> bool
pub fn is_autoclosure(&self) -> bool
Check if this is an autoclosure.
Sourcepub fn has_sending_result(&self) -> bool
pub fn has_sending_result(&self) -> bool
Check if this function has a sending result.
Trait Implementations§
Source§impl<'ctx> Clone for FunctionType<'ctx>
impl<'ctx> Clone for FunctionType<'ctx>
Source§fn clone(&self) -> FunctionType<'ctx>
fn clone(&self) -> FunctionType<'ctx>
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 moreSource§impl Debug for FunctionType<'_>
impl Debug for FunctionType<'_>
impl<'ctx> Copy for FunctionType<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for FunctionType<'ctx>
impl<'ctx> RefUnwindSafe for FunctionType<'ctx>
impl<'ctx> !Send for FunctionType<'ctx>
impl<'ctx> !Sync for FunctionType<'ctx>
impl<'ctx> Unpin for FunctionType<'ctx>
impl<'ctx> UnsafeUnpin for FunctionType<'ctx>
impl<'ctx> UnwindSafe for FunctionType<'ctx>
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