pub struct TypeEnvironment { /* private fields */ }Expand description
类型环境
Implementations§
Source§impl TypeEnvironment
impl TypeEnvironment
Sourcepub fn new() -> TypeEnvironment
pub fn new() -> TypeEnvironment
创建新的类型环境
Sourcepub fn add_variable(&mut self, name: String, type_info: TypeInfo)
pub fn add_variable(&mut self, name: String, type_info: TypeInfo)
添加变量类型
Sourcepub fn get_variable(&self, name: &String) -> Option<&TypeInfo>
pub fn get_variable(&self, name: &String) -> Option<&TypeInfo>
获取变量类型
Auto Trait Implementations§
impl Freeze for TypeEnvironment
impl RefUnwindSafe for TypeEnvironment
impl Send for TypeEnvironment
impl Sync for TypeEnvironment
impl Unpin for TypeEnvironment
impl UnsafeUnpin for TypeEnvironment
impl UnwindSafe for TypeEnvironment
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> 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