Struct sway_core::language::ty::TyConstantDecl
source · pub struct TyConstantDecl {
pub call_path: CallPath,
pub value: Option<TyExpression>,
pub visibility: Visibility,
pub is_configurable: bool,
pub attributes: AttributesMap,
pub return_type: TypeId,
pub type_ascription: TypeArgument,
pub span: Span,
pub implementing_type: Option<TyDecl>,
}
Fields§
§call_path: CallPath
§value: Option<TyExpression>
§visibility: Visibility
§is_configurable: bool
§attributes: AttributesMap
§return_type: TypeId
§type_ascription: TypeArgument
§span: Span
§implementing_type: Option<TyDecl>
Implementations§
source§impl TyConstantDecl
impl TyConstantDecl
pub fn type_check( ctx: TypeCheckContext<'_>, decl: ConstantDeclaration ) -> CompileResult<Self>
Trait Implementations§
source§impl Clone for TyConstantDecl
impl Clone for TyConstantDecl
source§fn clone(&self) -> TyConstantDecl
fn clone(&self) -> TyConstantDecl
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 TyConstantDecl
impl Debug for TyConstantDecl
source§impl DeclEngineGet<DeclId<TyConstantDecl>, TyConstantDecl> for DeclEngine
impl DeclEngineGet<DeclId<TyConstantDecl>, TyConstantDecl> for DeclEngine
fn get(&self, index: &DeclId<TyConstantDecl>) -> TyConstantDecl
source§impl DeclEngineGet<DeclRef<DeclId<TyConstantDecl>>, TyConstantDecl> for DeclEngine
impl DeclEngineGet<DeclRef<DeclId<TyConstantDecl>>, TyConstantDecl> for DeclEngine
fn get(&self, index: &DeclRef<DeclId<TyConstantDecl>>) -> TyConstantDecl
source§impl DeclEngineInsert<TyConstantDecl> for DeclEngine
impl DeclEngineInsert<TyConstantDecl> for DeclEngine
fn insert(&self, decl: TyConstantDecl) -> DeclRef<DeclId<TyConstantDecl>>
source§impl DeclEngineReplace<TyConstantDecl> for DeclEngine
impl DeclEngineReplace<TyConstantDecl> for DeclEngine
fn replace(&self, index: DeclId<TyConstantDecl>, decl: TyConstantDecl)
impl DeclEngineIndex<TyConstantDecl> for DeclEngine
Auto Trait Implementations§
impl RefUnwindSafe for TyConstantDecl
impl Send for TyConstantDecl
impl Sync for TyConstantDecl
impl Unpin for TyConstantDecl
impl UnwindSafe for TyConstantDecl
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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>
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)
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)
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.