Enum tealr::KindOfType
source · pub enum KindOfType {
Builtin,
External,
Generic,
}
Expand description
Keeps track of any special treatment a type needs to get
Variants§
Builtin
The type is build in to teal.
Never do anything special in this case.
External
The type come from a library (including this one).
In the future it might be possible that tealr generates the correct require
statements in this case
Generic
The type represent a generic type parameter.
When used it turns the method/function into a generic method/function.
Implementations§
source§impl KindOfType
impl KindOfType
sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
assert!(KindOfType::Generic.is_generic());
sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
assert!(KindOfType::Builtin.is_builtin());
sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
assert!(KindOfType::External.is_external());
Trait Implementations§
source§impl Clone for KindOfType
impl Clone for KindOfType
source§fn clone(&self) -> KindOfType
fn clone(&self) -> KindOfType
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 Debug for KindOfType
impl Debug for KindOfType
source§impl Default for KindOfType
impl Default for KindOfType
source§impl<'de> Deserialize<'de> for KindOfType
impl<'de> Deserialize<'de> for KindOfType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for KindOfType
impl Hash for KindOfType
source§impl PartialEq for KindOfType
impl PartialEq for KindOfType
source§fn eq(&self, other: &KindOfType) -> bool
fn eq(&self, other: &KindOfType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for KindOfType
impl Serialize for KindOfType
impl Eq for KindOfType
impl StructuralEq for KindOfType
impl StructuralPartialEq for KindOfType
Auto Trait Implementations§
impl RefUnwindSafe for KindOfType
impl Send for KindOfType
impl Sync for KindOfType
impl Unpin for KindOfType
impl UnwindSafe for KindOfType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more