pub enum FSharpType {
Show 18 variants
Int,
Int64,
Float,
Float32,
Bool,
FsString,
Char,
Unit,
Byte,
List(Box<FSharpType>),
Array(Box<FSharpType>),
Option(Box<FSharpType>),
Result(Box<FSharpType>, Box<FSharpType>),
Tuple(Vec<FSharpType>),
Fun(Box<FSharpType>, Box<FSharpType>),
Custom(String),
Generic(String, Vec<FSharpType>),
TypeVar(String),
}Expand description
An F# type expression used during code generation.
Variants§
Int
int — default integer (32-bit on .NET)
Int64
int64 — 64-bit signed integer
Float
float — 64-bit IEEE floating-point (double in .NET)
Float32
float32 — 32-bit IEEE floating-point
Bool
bool — boolean
FsString
string — .NET System.String
Char
char — .NET System.Char (UTF-16 code unit)
Unit
unit — ()
Byte
byte — unsigned 8-bit integer
List(Box<FSharpType>)
T list — immutable singly-linked list
Array(Box<FSharpType>)
T array — mutable .NET array
Option(Box<FSharpType>)
T option — optional value
Result(Box<FSharpType>, Box<FSharpType>)
Result<T, E> — result type
Tuple(Vec<FSharpType>)
T * U * … — tuple type
Fun(Box<FSharpType>, Box<FSharpType>)
T -> U — function type
Custom(String)
Named type (discriminated union, record, alias)
Generic(String, Vec<FSharpType>)
Generic type application: Map<K,V>, IEnumerable<T>, …
TypeVar(String)
Polymorphic type variable: 'a, 'b
Trait Implementations§
Source§impl Clone for FSharpType
impl Clone for FSharpType
Source§fn clone(&self) -> FSharpType
fn clone(&self) -> FSharpType
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 FSharpType
impl Debug for FSharpType
Source§impl Display for FSharpType
impl Display for FSharpType
Source§impl Hash for FSharpType
impl Hash for FSharpType
Source§impl PartialEq for FSharpType
impl PartialEq for FSharpType
impl Eq for FSharpType
impl StructuralPartialEq for FSharpType
Auto Trait Implementations§
impl Freeze for FSharpType
impl RefUnwindSafe for FSharpType
impl Send for FSharpType
impl Sync for FSharpType
impl Unpin for FSharpType
impl UnsafeUnpin for FSharpType
impl UnwindSafe for FSharpType
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