pub struct CallableMetadata { /* private fields */ }
Expand description
Representation of a callable’s metadata.
The callable is expected to hold onto an instance of this object within its struct to make queries fast.
Implementations§
Source§impl CallableMetadata
impl CallableMetadata
Sourcepub fn return_type(&self) -> Option<ExprType>
pub fn return_type(&self) -> Option<ExprType>
Gets the callable’s return type.
Sourcepub fn category(&self) -> &'static str
pub fn category(&self) -> &'static str
Gets the callable’s category as a collection of lines. The first line is the title of the category, and any extra lines are additional information for it.
Sourcepub fn description(&self) -> Lines<'static>
pub fn description(&self) -> Lines<'static>
Gets the callable’s textual description as a collection of lines. The first line is the summary of the callable’s purpose.
Sourcepub fn is_argless(&self) -> bool
pub fn is_argless(&self) -> bool
Returns true if this is a callable that takes no arguments.
Sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Returns true if this callable is a function (not a command).
Trait Implementations§
Source§impl Clone for CallableMetadata
impl Clone for CallableMetadata
Source§fn clone(&self) -> CallableMetadata
fn clone(&self) -> CallableMetadata
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for CallableMetadata
impl RefUnwindSafe for CallableMetadata
impl Send for CallableMetadata
impl Sync for CallableMetadata
impl Unpin for CallableMetadata
impl UnwindSafe for CallableMetadata
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