pub struct TypeFactory<'db> { /* private fields */ }Implementations§
Source§impl<'db> TypeFactory<'db>
impl<'db> TypeFactory<'db>
pub fn literal_string(&self, value: &str) -> TypeId
pub fn literal_number(&self, value: f64) -> TypeId
pub fn literal_boolean(&self, value: bool) -> TypeId
pub fn literal_bigint(&self, value: &str) -> TypeId
pub fn literal_bigint_with_sign(&self, negative: bool, digits: &str) -> TypeId
pub fn literal_string_atom(&self, atom: Atom) -> TypeId
pub fn union(&self, members: Vec<TypeId>) -> TypeId
pub fn union2(&self, left: TypeId, right: TypeId) -> TypeId
pub fn union3(&self, first: TypeId, second: TypeId, third: TypeId) -> TypeId
pub fn intersection(&self, members: Vec<TypeId>) -> TypeId
pub fn array(&self, element: TypeId) -> TypeId
pub fn tuple(&self, elements: Vec<TupleElement>) -> TypeId
pub fn object(&self, properties: Vec<PropertyInfo>) -> TypeId
pub fn object_with_flags( &self, properties: Vec<PropertyInfo>, flags: ObjectFlags, ) -> TypeId
pub fn object_fresh(&self, properties: Vec<PropertyInfo>) -> TypeId
pub fn object_with_index(&self, shape: ObjectShape) -> TypeId
pub fn object_with_flags_and_symbol( &self, properties: Vec<PropertyInfo>, flags: ObjectFlags, symbol: Option<SymbolId>, ) -> TypeId
pub fn function(&self, shape: FunctionShape) -> TypeId
pub fn callable(&self, shape: CallableShape) -> TypeId
pub fn template_literal(&self, spans: Vec<TemplateSpan>) -> TypeId
pub fn conditional(&self, conditional: ConditionalType) -> TypeId
pub fn mapped(&self, mapped: MappedType) -> TypeId
pub fn reference(&self, symbol: SymbolRef) -> TypeId
pub fn lazy(&self, def_id: DefId) -> TypeId
pub fn bound_parameter(&self, index: u32) -> TypeId
pub fn recursive(&self, depth: u32) -> TypeId
pub fn type_param(&self, info: TypeParamInfo) -> TypeId
pub fn type_query(&self, symbol: SymbolRef) -> TypeId
pub fn enum_type(&self, def_id: DefId, structural_type: TypeId) -> TypeId
pub fn application(&self, base: TypeId, args: Vec<TypeId>) -> TypeId
pub fn union_preserve_members(&self, members: Vec<TypeId>) -> TypeId
pub fn readonly_type(&self, inner: TypeId) -> TypeId
pub fn keyof(&self, inner: TypeId) -> TypeId
pub fn index_access(&self, object_type: TypeId, index_type: TypeId) -> TypeId
Trait Implementations§
Source§impl<'db> Clone for TypeFactory<'db>
impl<'db> Clone for TypeFactory<'db>
Source§fn clone(&self) -> TypeFactory<'db>
fn clone(&self) -> TypeFactory<'db>
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 moreimpl<'db> Copy for TypeFactory<'db>
Auto Trait Implementations§
impl<'db> Freeze for TypeFactory<'db>
impl<'db> !RefUnwindSafe for TypeFactory<'db>
impl<'db> !Send for TypeFactory<'db>
impl<'db> !Sync for TypeFactory<'db>
impl<'db> Unpin for TypeFactory<'db>
impl<'db> UnsafeUnpin for TypeFactory<'db>
impl<'db> !UnwindSafe for TypeFactory<'db>
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