Enum ezno_checker::types::Constructor
source · pub enum Constructor {
BinaryOperator {
lhs: TypeId,
operator: MathematicalAndBitwise,
rhs: TypeId,
result: TypeId,
},
CanonicalRelationOperator {
lhs: TypeId,
operator: CanonicalEqualityAndInequality,
rhs: TypeId,
},
TypeOperator(TypeOperator),
TypeExtends(TypeExtends),
ConditionalResult {
condition: TypeId,
truthy_result: TypeId,
otherwise_result: TypeId,
result_union: TypeId,
},
Image {
on: TypeId,
with: Box<[SynthesisedArgument]>,
result: TypeId,
},
Property {
on: TypeId,
under: PropertyKey<'static>,
result: TypeId,
mode: AccessMode,
},
Awaited {
on: TypeId,
result: TypeId,
},
KeyOf(TypeId),
}
Expand description
- Some of these can be specialised, others are only created via event specialisation
- Note that no || and && etc. This is handled using
Constructor::ConditionalResult
- Unary operations are encoded via
Constructor::BinaryOperator
equivalents
Variants§
BinaryOperator
Fields
§
operator: MathematicalAndBitwise
CanonicalRelationOperator
TypeOperator(TypeOperator)
JS type based operations
TypeExtends(TypeExtends)
TS operation
ConditionalResult
TODO constraint is res
Fields
Image
Output of a function where on is dependent (or sometimes for const functions one of with
is dependent)
Property
Access
Awaited
For await a poly type
KeyOf(TypeId)
From TS keyof
. Also
Trait Implementations§
source§impl Clone for Constructor
impl Clone for Constructor
source§fn clone(&self) -> Constructor
fn clone(&self) -> Constructor
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for Constructor
impl RefUnwindSafe for Constructor
impl Send for Constructor
impl Sync for Constructor
impl Unpin for Constructor
impl UnwindSafe for Constructor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more