Tuple Fields
0: BTreeMap<String, Type>
Implementations
sourceimpl TypeEnv
impl TypeEnv
pub fn new() -> Self
sourcepub fn ast_to_type(&self, ast: &IDLType) -> Result<Type>
pub fn ast_to_type(&self, ast: &IDLType) -> Result<Type>
Convert candid AST to internal Type
pub fn merge<'a>(&'a mut self, env: &TypeEnv) -> Result<&'a mut Self>
pub fn merge_type(&mut self, env: TypeEnv, ty: Type) -> Type
pub fn find_type(&self, name: &str) -> Result<&Type>
pub fn rec_find_type(&self, name: &str) -> Result<&Type>
pub fn trace_type<'a>(&'a self, t: &'a Type) -> Result<Type>
pub fn as_func<'a>(&'a self, t: &'a Type) -> Result<&'a Function>
pub fn as_service<'a>(&'a self, t: &'a Type) -> Result<&'a [(String, Type)]>
pub fn get_method<'a>(&'a self, t: &'a Type, id: &'a str) -> Result<&'a Function>
pub fn replace_empty(&mut self) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TypeEnv
impl Send for TypeEnv
impl Sync for TypeEnv
impl Unpin for TypeEnv
impl UnwindSafe for TypeEnv
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more