pub enum TyDecl {
Show 13 variants VariableDecl(Box<TyVariableDecl>), ConstantDecl { name: Ident, decl_id: DeclId<TyConstantDecl>, decl_span: Span, }, FunctionDecl { name: Ident, decl_id: DeclId<TyFunctionDecl>, subst_list: Template<SubstList>, decl_span: Span, }, TraitDecl { name: Ident, decl_id: DeclId<TyTraitDecl>, subst_list: Template<SubstList>, decl_span: Span, }, StructDecl { name: Ident, decl_id: DeclId<TyStructDecl>, subst_list: Template<SubstList>, decl_span: Span, }, EnumDecl { name: Ident, decl_id: DeclId<TyEnumDecl>, subst_list: Template<SubstList>, decl_span: Span, }, EnumVariantDecl { enum_ref: DeclRefEnum, variant_name: Ident, variant_decl_span: Span, }, ImplTrait { name: Ident, decl_id: DeclId<TyImplTrait>, subst_list: Template<SubstList>, decl_span: Span, }, AbiDecl { name: Ident, decl_id: DeclId<TyAbiDecl>, decl_span: Span, }, GenericTypeForFunctionScope { name: Ident, type_id: TypeId, }, ErrorRecovery(Span), StorageDecl { decl_id: DeclId<TyStorageDecl>, decl_span: Span, }, TypeAliasDecl { name: Ident, decl_id: DeclId<TyTypeAliasDecl>, decl_span: Span, },
}

Variants§

§

VariableDecl(Box<TyVariableDecl>)

§

ConstantDecl

Fields

§name: Ident
§decl_span: Span
§

FunctionDecl

Fields

§name: Ident
§subst_list: Template<SubstList>
§decl_span: Span
§

TraitDecl

Fields

§name: Ident
§subst_list: Template<SubstList>
§decl_span: Span
§

StructDecl

Fields

§name: Ident
§subst_list: Template<SubstList>
§decl_span: Span
§

EnumDecl

Fields

§name: Ident
§subst_list: Template<SubstList>
§decl_span: Span
§

EnumVariantDecl

Fields

§enum_ref: DeclRefEnum
§variant_name: Ident
§variant_decl_span: Span
§

ImplTrait

Fields

§name: Ident
§subst_list: Template<SubstList>
§decl_span: Span
§

AbiDecl

Fields

§name: Ident
§decl_span: Span
§

GenericTypeForFunctionScope

Fields

§name: Ident
§type_id: TypeId
§

ErrorRecovery(Span)

§

StorageDecl

Fields

§decl_span: Span
§

TypeAliasDecl

Fields

§name: Ident
§decl_span: Span

Implementations§

source§

impl TyDecl

source§

impl TyDecl

source

pub fn friendly_name(&self, engines: &Engines<'_>) -> String

friendly name string used for error reporting, which consists of the the identifier for the declaration.

source

pub fn friendly_type_name(&self) -> &'static str

friendly type name string used for error reporting, which consists of the type name of the declaration AST node.

source

pub fn doc_name(&self) -> &'static str

name string used in forc doc file path generation that mirrors cargo doc.

Trait Implementations§

source§

impl Clone for TyDecl

source§

fn clone(&self) -> TyDecl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TyDecl

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<DeclRef<DeclId<TyAbiDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyAbiDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyConstantDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyConstantDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyEnumDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyEnumDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyFunctionDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyFunctionDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyImplTrait>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyImplTrait>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyStorageDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyStorageDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyStructDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyStructDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyTraitDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyTraitDecl>>) -> Self

Converts to this type from the input type.
source§

impl From<DeclRef<DeclId<TyTypeAliasDecl>>> for TyDecl

source§

fn from(decl_ref: DeclRef<DeclId<TyTypeAliasDecl>>) -> Self

Converts to this type from the input type.
source§

impl GetDeclIdent for TyDecl

source§

impl Spanned for TyDecl

source§

fn span(&self) -> Span

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AnyDebug for Twhere T: Any + Debug,

source§

fn as_any_ref(&self) -> &(dyn Any + 'static)

Returns a reference to the underlying type as Any.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> StorageAsMut for T

§

fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,

§

fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,

§

impl<T> StorageAsRef for T

§

fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,

§

fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more