pub struct InkFile { /* private fields */ }
Expand description
An ink! file.
Implementations§
Source§impl InkFile
impl InkFile
Sourcepub fn trait_definitions(&self) -> &[TraitDefinition]
pub fn trait_definitions(&self) -> &[TraitDefinition]
Returns ink! trait definitions.
Sourcepub fn chain_extensions(&self) -> &[ChainExtension]
pub fn chain_extensions(&self) -> &[ChainExtension]
Returns ink! chain extensions.
Sourcepub fn storage_items(&self) -> &[StorageItem]
pub fn storage_items(&self) -> &[StorageItem]
Returns ink! storage items.
Sourcepub fn e2e_tests(&self) -> &[InkE2ETest]
pub fn e2e_tests(&self) -> &[InkE2ETest]
Returns ink! e2e tests.
Trait Implementations§
Source§impl From<SourceFile> for InkFile
impl From<SourceFile> for InkFile
Source§fn from(value: SourceFile) -> Self
fn from(value: SourceFile) -> Self
Converts to this type from the input type.
Source§impl InkEntity for InkFile
impl InkEntity for InkFile
Source§type AST = SourceFile
type AST = SourceFile
Associated AST node type.
Source§fn can_cast(node: &SyntaxNode) -> bool
fn can_cast(node: &SyntaxNode) -> bool
Returns true if an ink! entity can be derived from the syntax node. Read more
Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Returns an ink! entity if one can be derived for the syntax node. Read more
Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Returns the root syntax node for the ink! entity.
Source§fn ink_attr(&self) -> Option<&InkAttribute>
fn ink_attr(&self) -> Option<&InkAttribute>
Returns the ink! attribute the ink! entity was derived from (if any).
Source§fn item_at_offset(&self, offset: TextSize) -> ItemAtOffset
fn item_at_offset(&self, offset: TextSize) -> ItemAtOffset
Returns a representation of a token in the subtree which covers the position.
impl Eq for InkFile
impl StructuralPartialEq for InkFile
Auto Trait Implementations§
impl Freeze for InkFile
impl !RefUnwindSafe for InkFile
impl !Send for InkFile
impl !Sync for InkFile
impl Unpin for InkFile
impl !UnwindSafe for InkFile
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.