pub struct FsharpType {
pub tree: Type,
pub enum_like: bool,
pub bitmask_holder: Option<Primitive>,
}Expand description
An F# type, with the two properties CodecTarget::cast needs and
the tree cannot carry.
Fields§
§tree: TypeThe type as written.
enum_like: boolWhether a cast into it converts from an integer with enum<T>.
bitmask_holder: Option<Primitive>The holder, where the type names an integer under its own name
— a bitmask, whose F# form is type Flags = uint16. The tree
says Named("common_Flags") and F#’s numeric conversion
functions (uint16, …) know nothing of that name, only of the
primitive underneath it, so CodecTarget::cast needs the
width carried here to spell uint16(zd_bits) and not a
conversion function that does not exist.
Trait Implementations§
Source§impl Clone for FsharpType
impl Clone for FsharpType
Source§impl Debug for FsharpType
impl Debug for FsharpType
impl Eq for FsharpType
Source§impl PartialEq for FsharpType
impl PartialEq 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