pub struct BuiltinFn {
pub name: &'static str,
pub params: &'static [BuiltinParam],
pub ret: &'static str,
pub doc: &'static str,
}Expand description
One Lumen script builtin: its name, parameters, return type, and a one-line documentation string.
Fields§
§name: &'static strFunction name as called from script.
params: &'static [BuiltinParam]Ordered parameter list.
ret: &'static strReturn type (() for commands that return nothing).
doc: &'static strOne-line summary shown in completion detail and hover.
Implementations§
Source§impl BuiltinFn
impl BuiltinFn
Sourcepub fn signature(&self) -> String
pub fn signature(&self) -> String
Render a human-readable signature, e.g.
set_timeout(name: string, ms: int) -> ().
Sourcepub fn snippet(&self) -> String
pub fn snippet(&self) -> String
Render an LSP snippet insert string with tab-stops for each
parameter, e.g. set_timeout(${1:name}, ${2:ms}).
Sourcepub fn hover_markdown(&self, lang: &str) -> String
pub fn hover_markdown(&self, lang: &str) -> String
Render markdown documentation for hover: a fenced signature line followed by the doc summary.
lang is the fence language, so each host labels its own buffers
with its language name.
Trait Implementations§
impl Copy for BuiltinFn
impl Eq for BuiltinFn
impl StructuralPartialEq for BuiltinFn
Auto Trait Implementations§
impl Freeze for BuiltinFn
impl RefUnwindSafe for BuiltinFn
impl Send for BuiltinFn
impl Sync for BuiltinFn
impl Unpin for BuiltinFn
impl UnsafeUnpin for BuiltinFn
impl UnwindSafe for BuiltinFn
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,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.