pub enum InferredType {
Int,
Float,
Bool,
String,
Divert,
List(String),
}Expand description
The type of a VAR/CONST initializer literal. Deliberately separate from
the host-manifest BaseType vocabulary — Divert/List are ink runtime
concepts that must not leak into the manifest serialization schema.
List carries the declaring LIST’s name (issue #628): a list-literal
initializer’s type is nominal (List<L>), same as every other list type
in the Ty universe (Ty::List, TM-2’s List<L> annotation) — the
scalar/divert variants have no such nominal identity, so they stay bare.
Not Copy any more (the String payload), unlike before.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for InferredType
impl Clone for InferredType
Source§fn clone(&self) -> InferredType
fn clone(&self) -> InferredType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InferredType
impl Debug for InferredType
impl Eq for InferredType
Source§impl From<InferredType> for Ty
impl From<InferredType> for Ty
Source§fn from(t: InferredType) -> Self
fn from(t: InferredType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InferredType
impl PartialEq for InferredType
impl StructuralPartialEq for InferredType
Auto Trait Implementations§
impl Freeze for InferredType
impl RefUnwindSafe for InferredType
impl Send for InferredType
impl Sync for InferredType
impl Unpin for InferredType
impl UnsafeUnpin for InferredType
impl UnwindSafe for InferredType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.