Struct mamba::check::name::string_name::StringName
source · Expand description
Useful to denote class and function names, where Tuples and Anonymous functions are not permitted.
Fields§
§name: String
§generics: Vec<Name>
Implementations§
source§impl StringName
impl StringName
pub fn new(lit: &str, generics: &[Name]) -> StringName
pub fn trim(&self, ty: &str) -> Option<Self>
pub fn match_name(&self, other: &StringName, pos: Position) -> TypeResult<NameMap>
Trait Implementations§
source§impl Clone for StringName
impl Clone for StringName
source§fn clone(&self) -> StringName
fn clone(&self) -> StringName
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ColType for StringName
impl ColType for StringName
source§impl ContainsTemp for StringName
impl ContainsTemp for StringName
fn contains_temp(&self) -> bool
source§impl Debug for StringName
impl Debug for StringName
source§impl Display for StringName
impl Display for StringName
source§impl From<&StringName> for Name
impl From<&StringName> for Name
source§fn from(name: &StringName) -> Self
fn from(name: &StringName) -> Self
Converts to this type from the input type.
source§impl From<&StringName> for TrueName
impl From<&StringName> for TrueName
source§fn from(name: &StringName) -> Self
fn from(name: &StringName) -> Self
Converts to this type from the input type.
source§impl From<&TrueName> for StringName
impl From<&TrueName> for StringName
source§impl From<&str> for StringName
impl From<&str> for StringName
source§impl HasParent<&StringName> for Class
impl HasParent<&StringName> for Class
source§fn has_parent(
&self,
other: &StringName,
ctx: &Context,
pos: Position
) -> TypeResult<bool>
fn has_parent(
&self,
other: &StringName,
ctx: &Context,
pos: Position
) -> TypeResult<bool>
Has name as parent. Read more
source§impl Hash for StringName
impl Hash for StringName
source§impl IsSuperSet<StringName> for StringName
impl IsSuperSet<StringName> for StringName
fn is_superset_of(
&self,
other: &StringName,
ctx: &Context,
pos: Position
) -> TypeResult<bool>
source§impl LookupClass<&StringName, Class> for Context
impl LookupClass<&StringName, Class> for Context
source§fn class(&self, class: &StringName, pos: Position) -> TypeResult<Class>
fn class(&self, class: &StringName, pos: Position) -> TypeResult<Class>
Look up union of GenericClass and substitute generics to yield set of classes.
Substitutes all generics in the class when found.
source§impl LookupFunction<&StringName, Function> for Context
impl LookupFunction<&StringName, Function> for Context
source§fn function(&self, function: &StringName, pos: Position) -> TypeResult<Function>
fn function(&self, function: &StringName, pos: Position) -> TypeResult<Function>
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 true_name.
source§impl MatchTempName for StringName
impl MatchTempName for StringName
fn temp_map(
&self,
other: &StringName,
mapping: NameMap,
pos: Position
) -> TypeResult<NameMap>
source§impl Ord for StringName
impl Ord for StringName
source§fn cmp(&self, other: &StringName) -> Ordering
fn cmp(&self, other: &StringName) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<StringName> for StringName
impl PartialEq<StringName> for StringName
source§fn eq(&self, other: &StringName) -> bool
fn eq(&self, other: &StringName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<StringName> for StringName
impl PartialOrd<StringName> for StringName
source§fn partial_cmp(&self, other: &StringName) -> Option<Ordering>
fn partial_cmp(&self, other: &StringName) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more