pub struct TypeInference { /* private fields */ }Expand description
类型推断器
用于根据值或表达式推断类型。
Implementations§
Source§impl TypeInference
impl TypeInference
Sourcepub fn from_webidl_result(result: &WebIdlResult) -> Self
pub fn from_webidl_result(result: &WebIdlResult) -> Self
Sourcepub fn load_webidl_types(&mut self, result: &WebIdlResult)
pub fn load_webidl_types(&mut self, result: &WebIdlResult)
Sourcepub fn infer_type(&self, value: &str) -> InferredType
pub fn infer_type(&self, value: &str) -> InferredType
Sourcepub fn infer_expression_type(&self, expression: &str) -> InferredType
pub fn infer_expression_type(&self, expression: &str) -> InferredType
Sourcepub fn add_interface(
&mut self,
name: impl Into<String>,
properties: Vec<InterfaceProperty>,
)
pub fn add_interface( &mut self, name: impl Into<String>, properties: Vec<InterfaceProperty>, )
Trait Implementations§
Source§impl Clone for TypeInference
impl Clone for TypeInference
Source§fn clone(&self) -> TypeInference
fn clone(&self) -> TypeInference
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 TypeInference
impl Debug for TypeInference
Auto Trait Implementations§
impl Freeze for TypeInference
impl RefUnwindSafe for TypeInference
impl Send for TypeInference
impl Sync for TypeInference
impl Unpin for TypeInference
impl UnsafeUnpin for TypeInference
impl UnwindSafe for TypeInference
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