pub struct TypeRef<'ctx> { /* private fields */ }Expand description
A reference to a Swift type.
This wraps a raw node and provides methods to extract type information. The type information is parsed lazily when accessed.
Implementations§
Source§impl<'ctx> TypeRef<'ctx>
impl<'ctx> TypeRef<'ctx>
Sourcepub fn generic_args(&self) -> Vec<TypeRef<'ctx>>
pub fn generic_args(&self) -> Vec<TypeRef<'ctx>>
Get generic arguments if this is a generic type.
Returns an empty vector if this is not a generic type.
Sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Check if this is a generic type.
Trait Implementations§
impl<'ctx> Copy for TypeRef<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for TypeRef<'ctx>
impl<'ctx> RefUnwindSafe for TypeRef<'ctx>
impl<'ctx> !Send for TypeRef<'ctx>
impl<'ctx> !Sync for TypeRef<'ctx>
impl<'ctx> Unpin for TypeRef<'ctx>
impl<'ctx> UnsafeUnpin for TypeRef<'ctx>
impl<'ctx> UnwindSafe for TypeRef<'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