pub enum SwiftType {
Show 20 variants
SwiftInt,
SwiftBool,
SwiftString,
SwiftDouble,
SwiftFloat,
SwiftVoid,
SwiftArray(Box<SwiftType>),
SwiftDict(Box<SwiftType>, Box<SwiftType>),
SwiftOptional(Box<SwiftType>),
SwiftTuple(Vec<SwiftType>),
SwiftFunc(Vec<SwiftType>, Box<SwiftType>),
SwiftEnum(String),
SwiftStruct(String),
SwiftClass(String),
SwiftProtocol(String),
SwiftGeneric(String, Vec<SwiftType>),
SwiftAny,
SwiftAnyObject,
SwiftNever,
SwiftNamed(String),
}Expand description
Swift type representation for type-directed code generation.
Variants§
SwiftInt
Int — platform-native signed integer
SwiftBool
Bool — boolean
SwiftString
String — Unicode string
SwiftDouble
Double — 64-bit floating-point
SwiftFloat
Float — 32-bit floating-point
SwiftVoid
Void — unit / no value
SwiftArray(Box<SwiftType>)
[T] — array of T
SwiftDict(Box<SwiftType>, Box<SwiftType>)
[K: V] — dictionary
SwiftOptional(Box<SwiftType>)
T? — optional
SwiftTuple(Vec<SwiftType>)
(A, B, ...) — tuple
SwiftFunc(Vec<SwiftType>, Box<SwiftType>)
(A, B) -> R — function type
SwiftEnum(String)
Named enum type
SwiftStruct(String)
Named struct type
SwiftClass(String)
Named class type
SwiftProtocol(String)
Named protocol type
SwiftGeneric(String, Vec<SwiftType>)
Generic type: Array<T>, Result<T, E>, etc.
SwiftAny
Any — existential any
SwiftAnyObject
AnyObject — class-constrained any
SwiftNever
Never — uninhabited type
SwiftNamed(String)
Raw named type (user-supplied string)
Trait Implementations§
impl Eq for SwiftType
impl StructuralPartialEq for SwiftType
Auto Trait Implementations§
impl Freeze for SwiftType
impl RefUnwindSafe for SwiftType
impl Send for SwiftType
impl Sync for SwiftType
impl Unpin for SwiftType
impl UnsafeUnpin for SwiftType
impl UnwindSafe for SwiftType
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