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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more