Skip to main content

HasType

Trait HasType 

Source
pub trait HasType {
    // Required method
    fn inferred_type<'db>(
        &self,
        model: &SemanticModel<'db>,
    ) -> Option<Type<'db>>;
}

Required Methods§

Source

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Returns the inferred type of self.

§Panics

May panic if self is from another file than model.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl HasType for Alias

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExceptHandlerExceptHandler

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for Expr

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprAttribute

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprAwait

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprBinOp

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprBoolOp

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprBooleanLiteral

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprBytesLiteral

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprCall

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprCompare

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprDict

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprDictComp

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprEllipsisLiteral

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprFString

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprGenerator

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprIf

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprIpyEscapeCommand

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprLambda

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprList

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprListComp

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprName

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprNamed

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprNoneLiteral

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprNumberLiteral

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprRef<'_>

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprSet

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprSetComp

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprSlice

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprStarred

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprStringLiteral

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprSubscript

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprTString

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprTuple

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprUnaryOp

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprYield

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ExprYieldFrom

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for Parameter

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for ParameterWithDefault

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for StmtClassDef

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for StmtFunctionDef

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for StmtTypeAlias

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for TypeParamParamSpec

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for TypeParamTypeVar

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Source§

impl HasType for TypeParamTypeVarTuple

Source§

fn inferred_type<'db>(&self, model: &SemanticModel<'db>) -> Option<Type<'db>>

Implementors§