[][src]Struct mamba::check::context::name::DirectName

pub struct DirectName {
    pub name: String,
    pub generics: Vec<NameUnion>,
}

A direct name is a string with accompanying generics.

Useful to denote class and function names, where Tuples and Anonymous functions are not permitted.

Fields

name: Stringgenerics: Vec<NameUnion>

Methods

impl DirectName[src]

pub fn new(lit: &str, generics: &[NameUnion]) -> DirectName[src]

pub fn empty() -> DirectName[src]

pub fn substitute(
    &self,
    generics: &HashMap<String, Name>,
    pos: &Position
) -> TypeResult<DirectName>
[src]

Trait Implementations

impl Clone for DirectName[src]

impl Debug for DirectName[src]

impl Display for DirectName[src]

impl Eq for DirectName[src]

impl<'_> From<&'_ DirectName> for NameUnion[src]

impl<'_> From<&'_ DirectName> for Name[src]

impl<'_> From<&'_ str> for DirectName[src]

impl<'_> HasParent<&'_ DirectName> for Class[src]

impl<'_> HasParent<&'_ DirectName> for ClassUnion[src]

impl<'_> HasParent<&'_ DirectName> for ClassTuple[src]

impl Hash for DirectName[src]

impl IsSuperSet<DirectName> for DirectName[src]

impl<'_> LookupClass<&'_ DirectName, Class> for Context[src]

fn class(
    &self,
    class: &DirectName,
    pos: &Position
) -> Result<Class, Vec<TypeErr>>
[src]

Look up union of GenericClass and substitute generics to yield set of Classes.

impl<'_> LookupFunction<&'_ DirectName, Function> for Context[src]

fn function(
    &self,
    function: &DirectName,
    pos: &Position
) -> Result<Function, Vec<TypeErr>>
[src]

Look up a function and substitutes generics to yield a Function.

If function does not exist, treat function as constructor and see if there exists a class with the same name.

impl PartialEq<DirectName> for DirectName[src]

impl StructuralEq for DirectName[src]

impl StructuralPartialEq for DirectName[src]

impl<'_> TryFrom<&'_ AST> for DirectName[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl<'_> TryFrom<&'_ Box<AST>> for DirectName[src]

type Error = Vec<TypeErr>

The type returned in the event of a conversion error.

impl Union<DirectName> for NameUnion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,