pub struct Analysis { /* private fields */ }
Expand description
Entry point for asking for semantic information about ink! smart contract code.
Implementations§
Source§impl Analysis
impl Analysis
Sourcepub fn new(code: &str, version: Version) -> Self
pub fn new(code: &str, version: Version) -> Self
Creates an analysis instance from smart contract code.
Sourcepub fn file(&self) -> &InkFile
pub fn file(&self) -> &InkFile
Returns the intermediate representation (IR) of the smart contract code.
Sourcepub fn diagnostics(&self) -> Vec<Diagnostic>
pub fn diagnostics(&self) -> Vec<Diagnostic>
Runs diagnostics for the smart contract code.
Sourcepub fn completions(&self, position: TextSize) -> Vec<Completion>
pub fn completions(&self, position: TextSize) -> Vec<Completion>
Computes ink! attribute completions at the given position.
Sourcepub fn actions(&self, range: TextRange) -> Vec<Action>
pub fn actions(&self, range: TextRange) -> Vec<Action>
Computes ink! attribute code/intent actions for the given text range.
Sourcepub fn hover(&self, range: TextRange) -> Option<Hover>
pub fn hover(&self, range: TextRange) -> Option<Hover>
Returns descriptive/informational text for the ink! attribute at the given text range (if any).
Sourcepub fn inlay_hints(&self, range: Option<TextRange>) -> Vec<InlayHint>
pub fn inlay_hints(&self, range: Option<TextRange>) -> Vec<InlayHint>
Computes ink! attribute argument inlay hints for the given text range (if any).
Sourcepub fn signature_help(&self, position: TextSize) -> Vec<SignatureHelp>
pub fn signature_help(&self, position: TextSize) -> Vec<SignatureHelp>
Computes ink! attribute signature help for the given position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Analysis
impl !RefUnwindSafe for Analysis
impl !Send for Analysis
impl !Sync for Analysis
impl Unpin for Analysis
impl !UnwindSafe for Analysis
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